I've accidentally got a file in my repo named :web,. When typing git rm :web, it seems to think the colon is a part of a command and not the start of a filename:
fatal: pathspec 'web,' did not match any files
Quotes don't make a difference.
You need to escape the : (and not just in your shell, but for git itself):
git rm '\:web,'
or
git rm \\:web,
Alternatively, you could use the :-based pathspec that the error is telling you about. For example:
git rm :::web,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With