Constantly changing my web.config file when testing/pushing to production gets old, so does having to remember to remove that from my staged changes when I don't change the file.
I have tried using selecting the "stop tracking" option in Sourcetree (which I think adds the file to my GitIgnore), but that looks like it will remove the file from my remote repo.
Is it possible to leave a file in my remote repo, and stop tracking local changes?
Use the following command:
git update-index --assume-unchanged <filename>
If you want to undo it later, use:
git update-index --no-assume-unchanged <filename>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments