Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么我能';是否将此远程GitHub存储库添加到我的本地GIT存储库中作为远程?_Git_Github_Git Remote - Fatal编程技术网

为什么我能';是否将此远程GitHub存储库添加到我的本地GIT存储库中作为远程?

为什么我能';是否将此远程GitHub存储库添加到我的本地GIT存储库中作为远程?,git,github,git-remote,Git,Github,Git Remote,我是GIT和GitHub的新手,在尝试将本地存储库链接到GitHub帐户时遇到以下问题 我有: 其中,是GitHub为此存储库提供的https链接 为什么我会获得此错误消息?什么意思没有这样的远程“来源”?如何解决此问题?您使用的命令不是添加遥控器,而是设置现有遥控器的URL。您要查找的命令是 git remote add origin https://github.com/AndreaNobili/recipes.git 如果要更改url或修复键入错误,可以使用设置url: # Note t

我是GIT和GitHub的新手,在尝试将本地存储库链接到GitHub帐户时遇到以下问题

我有:

其中,是GitHub为此存储库提供的https链接


为什么我会获得此错误消息?什么意思没有这样的远程“来源”?如何解决此问题?

您使用的命令不是添加遥控器,而是设置现有遥控器的URL。您要查找的命令是

git remote add origin https://github.com/AndreaNobili/recipes.git
如果要更改url或修复键入错误,可以使用
设置url

# Note the typo in the URL:
git remote add origin https://gmail.com/AndreaNobili/recipes.git
# This command fixes the typo:
git remote set-url origin https://github.com/AndreaNobili/recipes.git

您使用的命令不是添加遥控器,而是设置现有遥控器的URL。您要查找的命令是

git remote add origin https://github.com/AndreaNobili/recipes.git
如果要更改url或修复键入错误,可以使用
设置url

# Note the typo in the URL:
git remote add origin https://gmail.com/AndreaNobili/recipes.git
# This command fixes the typo:
git remote set-url origin https://github.com/AndreaNobili/recipes.git

作为扩展,您可以使用

git remote add --track master origin github.com/AndreaNobili/recipes.git
git remote add --master origin github.com/AndreaNobili/recipes.git
这只跟踪主分支

git remote add --track different-oil origin github.com/AndreaNobili/recipes.git

这会跟踪不同的机油分支

作为扩展,您可以使用

git remote add --track master origin github.com/AndreaNobili/recipes.git
git remote add --master origin github.com/AndreaNobili/recipes.git
这只跟踪主分支

git remote add --track different-oil origin github.com/AndreaNobili/recipes.git
这跟踪不同的油分支