git does not seem to do what I want here so I need some advise. I have a configuration file with sensitive information such as passwords. Say I have checked in the config file with blank/generic values:
username =
password =
Now I fill it with real values, and then add the file to .gitignore (the filename is build.properties)
username = bob
password = secretpassword
Even though I have added it to .gitignore, git still seems to "see it". What should I do here?
hostname$ more .gitignore
build
ant.build
*.swp
build.properties
hostname$ git status
# On branch dev
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: build.properties
#
no changes added to commit (use "git add" and/or "git commit -a")
Am I misunderstanding something?