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?>
Another possible reason – a few instances of Git clients running at the same time. For example, "git shell" + "GitHub Desktop", etc.
This happened to me. I was using "GitHub Desktop" as the main client, and it was ignoring some new .gitignore settings: commit after commit:
Reason: the Visual Studio Code editor was running in the background with the same opened repository. Visual Studio Code has built-in Git control, and this makes for some conflicts.
Solution: double-check multiple, hidden Git clients and use only one Git client at a time, especially while clearing the Git cache.