So far I used git update-index --assume-unchanged
on the database configuration file after I filled in the database password because I don't want my database password to get into the public code repository.
Now I wanted to try and use SourceTree for a while and I can't find a way to do the same with it: The file should remain in the repository but I just want SourceTree to ignore changes to that file in my working copy.
When the "assume unchanged" bit is on, the user promises not to change the file and allows Git to assume that the working tree file matches what is recorded in the index. If you want to change the working tree file, you need to unset the bit to tell Git.
--skip-worktree explained: This allows you to make changes to a file that you don't want to be pushed to upstream.
I just defined custom action for this task.
Make sure the path to git is correct.
Thanks to @RobCroll from the comments, we now have a Windows version:
C:\Program Files (x86)\Git\bin\git.exe (for x64 use: C:\Program Files\Git\bin) Parameters: update-index --assume-unchanged $FILE
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