Is it added to the repository, not in .git/info/exclude and not on .gitignore?
If the answer is yes to either of those, then the file is not in the repository and this is the reason for the error.
Try git ls-files -o and see if the file is there. It should not be.