.gitignore is ignored by Git

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? My .gitignore: # This is a comment debug.log nbproject/ Output from git status: # On branch master # Your branch is ahead of ‘origin/master’ by 1 commit. # # … Read more

Ignore files that have already been committed to a Git repository [duplicate]

This question already has answers here: How can I make Git “forget” about a file that was tracked, but is now in .gitignore? (31 answers) Closed 4 years ago. I have an already initialized Git repository that I added a .gitignore file to. How can I refresh the file index so the files I want … Read more