.gitignore is not working?

git

.gitignore ignores just files that weren’t tracked before (by git add). Run git rm --cached name_of_file and your file will be ignored again.

from
http://stackoverflow.com/questions/4308610/how-to-ignore-files-in-git