In my git repository I've got a weird file in the staging area that's refusing to be reverted, removed, committed - basically I can't make it go away..
The file must be some ancient OS 9 file sitting there in the folder for years.
Couple days ago I've removed the file in the file system so now git is tracking the deletion of
fatal: pathspec 'folder/Iconr' did not match any files
It is best to revert to the command line in order to have a more precise error message.
There you can try a
git add -u, followed by a
git commit, in order to register the deletion of that file in the repo.
git status says file is deleted but
git rm says
error: pathspec '…' did not match any files" as an example.
You can also preview what a git clean would give:
git clean -d -x -n (as explained in "Why is there no “pathspec” when I try to remove a folder in Git?")
The other issue is when that file isn't tracked at all in your current branch, but is tracked in another branch. See that answer to check if that is the case.