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.