Ad

Git Status Is Reporting Files It Should Ignore

- 1 answer

My git version 2.5.4 (Apple Git-61) which is running OSX 10.11.2 is reporting files in red which it is expected to ignore according to the content *.txt of .gitignore, please see below;

enter image description here

Please help fix this.

Thank you

Ad

Answer

These files are already known to your repository (were added previously), so git does track the state of these files. The .gitignore serves for filtering out any unknown yet files by matching with name templates listed.

So, either do git rm for these files and then commit or add the changed versions and commit according to your needs.

Ad
source: stackoverflow.com
Ad