Skip to main content

Posts

Showing posts from May, 2017

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 dev.properties 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 If you wanna start tracking changes again git update-index --no-assume-unchanged Reference Reading If you are trying to ignore changes to a file that's already tracked in the repository (e.g. a dev.properties 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 ``` If you wanna start tracking changes again ``` git update-index --no-assume-unchanged ``` [Reference Reading](https://www.kernel.org/pub/software/scm/git/docs/git-update-index.html)