Technology / Software /
27 Jul 2022
Git ignoring .gitignore fix
Sometimes Git will just appear to “ignore” an entry in .gitignore
, usually right after a new entry has been added to the ignore file, or an updated ignorefile has been pulled down from a remote repo.
tl;dr this is the solution:
Bash
git update-index --assume-unchanged path/to/file
This was specifically a problem with the .obsidian/workspace
file after I added it to the top-level ignorefile in Knowledgebase.
References
- Solution on Stack Overflow - note many solutions don’t work anymore; see this comment on the one that finally worked