简体   繁体   English

为什么 git 远程添加不起作用__?

[英]Why git remote add is not working__?

The git remote add is not woking. git 远程添加不工作。 I`ve tried even the $ git remote set-url/ $ git remote set-url --add Local_1我什至尝试过 $ git remote set-url/ $ git remote set-url --add Local_1

$ git remote add local_1 \C\Users\Luciano\OneDrive\Área de Trabalho\Repositório_Alura_teste\Server usage: git remote add [] $ git 远程添加 local_1 \C\Users\Luciano\OneDrive\Área de Trabalho\Repositório_Alura_teste\Server usage: git 远程添加 []

-f, --fetch           fetch the remote branches
--tags                import all tags and associated objects when fetching
                      or do not fetch any tag at all (--no-tags)
-t, --track <branch>  branch(es) to track
-m, --master <branch>
                      master branch
--mirror[=(push|fetch)]
                      set up remote as a mirror to push to or fetch from

Git remote complains because the destination directory contains space characters, and thus are interpreted as several arguments. Try running Git 远程抱怨,因为目标目录包含空格字符,因此被解释为几个 arguments。尝试运行

git remote add local_1 '\C\Users\Luciano\OneDrive\Área de Trabalho\Repositório_Alura_teste\Server'

Also when using windows slashes ( \ ) in paths they need to be escaped.此外,当在路径中使用 windows 斜杠 ( \ ) 时,它们需要被转义。 Generally it is better to use / .通常最好使用/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM