The image says it all. Why is git telling me that I've changed the file when I'm explicitly telling it to ignore it?
- 1possible duplicate of Making git "forget" about a file that was tracked but is now in .gitignore1615903– 16159032015-09-24 05:01:17 +00:00Commented Sep 24, 2015 at 5:01
Add a comment |
3 Answers
A .gitignore specifies files that should not be added to git's index. It does not prevent changes to files that are already in the index.
If you want to remove the file completely from the index, you will need to commit a deletion of that file. Then if the file gets recreated (and it is still listed in .gitignore), it will not be re-added to the index.