What I find works is to check in a version of the file with blanked or dummy values and then to run:
git update-index --assume-unchanged [fileName]
Git will then stop monitoring changes to that file allowing you to put the real config info into it without fear of checking it in.
If you later make changes that you DO want to check in you can run:
git update-index --no-assume-unchanged [fileName]