Git on Windows: failed to create leading directory errors

I installed MsysGit on Windows. The following command, invoked from the cmd.exe command line, gives an error:

C:\Users\joe>git clone 'git://github.com/MarcWeber/vim-addon-manager-known-repositories.git' 'C:/Users/joe/vim-addons/vim-addon-manager-known-repositories'
fatal: could not create leading directories of ''C:/Users/joe/vim-addons/vim-addon-manager-known-repositories'': Invalid argument

The same command that is issued on the Git Bash command line works fine.

What can I fix to make a regular version of the command line? This command is issued from Vim, so I need it to work from cmd.exe.

+3
source share
2 answers

Do not use single quotes in cmd windows. Use double quotes for paths with spaces or no quotes at all when no spaces exist.

In your case, spaces are not in the way, so no quotes are needed.

.

C:\path\no\spaces               // ok
"C:\Program Files\Some Spaces"  // ok
'C:\Program Files\Foo'          // wrong.
+4

, github vunble.

https://github.com/gmarik/vundle/issues/283

, shellslash ""

.

0

Source: https://habr.com/ru/post/1779327/


All Articles