I added files in my git repository that I want to remove now. I deleted it with rm XXX
.
Now, git status
shows me:
Changed but not updated:
deleted: "Sche\314\201ma application + interface.graffle"
No matter how I git rm
it, I still have a :
fatal: pathspec 'Schêma application + interface.graffle' did not match any files
I tried to escape whitespaces with \
, to escape \
with \\
, to escape "
with \"
. No matter what I tried, it failed.
Do you have hints?
Git rm vs rmThe git rm command removes the file from both the git repository and the local file system. The rm command, on the other hand, only removes the file from the file system.
By default, the git rm command deletes files both from the Git repository as well as the filesystem. Using the --cached flag, the actual file on disk will not be deleted.
The git rm command can be used to remove individual files or a collection of files. The primary function of git rm is to remove tracked files from the Git index. Additionally, git rm can be used to remove files from both the staging index and the working directory.
Command line Git repository delete Just run the rm command with the -f and -r switch to recursively remove the . git folder and all of the files and folders it contains. This Git repo remove command also allows you to delete the Git repo while allowing all of the other files and folder to remain untouched.
This will detect the remove:
git add -u
try git gui. You could probably escape it properly but it might be too much trouble than it's worth. It should escape this properly.
If your issue is staging removals, just git add -A
to add all changes to the index.
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