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 tricky thing not covered by the other answers here is that the .gitignore file won't work if you have inline comments, like this:
foo/bar # The bar file contains sensitive data so we don't want to make this public
So, if you do have comments like that, change them like this:
# The bar file contains sensitive data so we don't want to make this public
foo/bar