My .gitignore file seems to be being ignored by Git - could the .gitignore file be corrupt? Which file format, locale or culture does Git expect?>
It is also a possibility that you edited the .gitignore file with a sudo command. I encountered the same issue and while executing the commands: git status, I could still see the "should be ignored" files.
Upon editing with nano .gitignore instead of sudo nano .gitignore, I could see the correct reflection.