I added the following line to .gitignore:
.gitignore
sites/default/settings.php
but when I type git status it shows the file
git status
I run into this, it's an old question, but I want that file to be tracked but to not track it on certain working copies, to do that you can run
git update-index --assume-unchanged sites/default/settings.php