Git : Ignore changes to a file that is already tracked in repository

If you are trying to ignore changes to a file that's already tracked in the repository (e.g. a file that you would need to change for your local environment but you would never want to check in these changes) than what you want to do is:

git update-index --assume-unchanged <file>

If you wanna start tracking changes again

git update-index --no-assume-unchanged <file>

Reference Reading

No comments :

Post a Comment