I need to delete a file from the file system that is tracked by the Git repository, and I want to leave this file in the Git repository unchanged (no commit for the repo). This is easy for a locally modified file where I use an optional update index option and it works fine. I need the same behavior for deleted files.
I tried this without success:
git update-index --assume-unchanged <file>
.git/info/exclude
If you run git update-index --assume-unchanged <file>before deleting the file, this will work. eg.
$ git update-index --assume-unchanged <file> $ rm <file> $ git status # On branch master nothing to commit, working directory clean