Try git update-index --assume-unchanged <path>
.
But it's important to note, that a hard reset will revert this (stash
for example makes a hard reset).
Question
I commited a basic version (without passwords etc.) of my config-file to a git repo. Now I want it to not show up below "changes not staged for commit" as modified anymore so I can just use git add *
without worrying that I commit my user-data.
Adding the file in question to .gitignore didn't help.
Solution
Try git update-index --assume-unchanged <path>
.
But it's important to note, that a hard reset will revert this (stash
for example makes a hard reset).