Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equivalent to "git update-index --assume-unchanged" in SourceTree

Tags:

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.

like image 864
anothernode Avatar asked Aug 03 '12 12:08

anothernode


People also ask

What is assume unchanged in Git?

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.

What is Skip Worktree?

--skip-worktree explained: This allows you to make changes to a file that you don't want to be pushed to upstream.


1 Answers

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  

enter image description here

like image 85
Fabian Blechschmidt Avatar answered Sep 24 '22 23:09

Fabian Blechschmidt