I added the following line to .gitignore
:
sites/default/settings.php
but when I type git status
it shows the file
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. VS Code has built-in git control, and this makes some conflicts.
Solution: double-check multiple, hidden git clients and use only one git client at once, especially while clearing git cache.