I have a file "npz, species_coex.npz", that was added to my git repository by mistake. After realizing my mistake I removed it with git rm. Now I found out, that git still knows about it (which is usually fine, but I want git to forget completely about it, as if it was never added in the first place).
I've read about the filter-branch command, but would like to not use it, because of all the warnings about it, if this is not possible tell me.
I've read this, they recommend:
$ git filter-branch --tree-filter 'rm -f "npz, species_coex.npz" ' HEAD
I get the error:
fatal: ambiguous argument 'npz, species_coex.npz': unknown revision or path not in the working tree
I'm not sure, why this problem occurs, because of the blank space (which I guess not, as I put it into quotations) or because the file is not in the current head? How can I tell him where this file is to be found?
And is there a way, how I can do this without a filter branch? I only added the file once and then removed it, so it's history is quite simple