Reputation: 14175
I had to make a local modification of a file which is part of my git repo, but I don't to commit that file, or lose my modification. I don't want to have to git add -p every time either. I added the file to my gitignore but this didn't work.
Upvotes: 1
Views: 28
Reputation: 28519
You can do
git update-index --assume-unchanged [the path to your file]
you can reverse the operation at any point by calling
git update-index --no-assume-unchanged [the path to your file]
Upvotes: 2