I have a folder by the name 31 Files of - oop
. When I try running this command:
git rm -rf 31 Files of - oop
I get this fatal error :
fatal: pathspec '31' did not match any files
How do I need to prepare the folder names with spaces for use in git?.
Surround the folder or file with a space in it with quotes! On Mac and Linux, you can add single quotes, but on Windows you'll have to use double quotes. …and everything worked as expected! This works for all the git commands: so add and diff , for instance, are included.
To change this current working directory, you can use the "cd" command (where "cd" stands for "change directory"). For example, to move one directory upwards (into the current folder's parent folder), you can just call: $ cd ..
Git will only track Files and the changes in them. So folders are tracked as part of the file changes in them. In order to create an empty folder and commit it, there have to be some files inside it.
In Git, this database is known as a repository and its structure is inspired by the Linux file system. The repository maintains a history of the changes to our codebase. The . git folder contains all information that is necessary for the project and all information relating commits, remote repository address, etc.
Try in this way :
git rm -rf "31 Files of - oop"
Where 31 Files of - oop is your file name.
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