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?
In the Git Changes window, right-click any changed file that you want Git to ignore and choose Ignore this local item or Ignore this extension. Those menu options don't exist for tracked files.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With