GIT: Remove file from repository and keep it locally
First of all I should tell myself again and again:
"You must not commit your .project and .classpath files!"
But it happens all the time, even though I am sure those files are already added to .gitignore.
Anyway the solution to fix this luckily is simple and will be shown in the following using .project as an example.
git rm --cached .project
git commit -m "Removing files accidently committed"
git push
Written by Thomas Jaspers
Related protips
1 Response
Thanks a lot, very good hint ... there is always something to learn on GIT :).
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#