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?>
One thing to also look at: Are you saving your .gitignore file with the correct line endings?
Windows:
If you're using it on Windows, are you saving it with Windows line endings? Not all programs will do this by default; Notepad++ and many PHP editors default to Linux line endings so the files will be server compatible. One easy way to check this, is open the file in Windows Notepad. If everything appears on one line, then the file was saved with Linux line endings.
Linux:
If you are having trouble with the file working in a Linux environment, open the file in an editor such as Emacs or nano. If you see any non-printable characters, then the file was saved with Windows line endings.