我绝对不是GIT和GitHub的新手,尝试将我的本地存储库链接到GitHub帐户时遇到以下问题
我做:
Andrea@Andrea-PC MINGW64 ~/Documents/WS_vari/version-control/recipes (master)
$ git remote set-url origin https://github.com/AndreaNobili/recipes.git
fatal: No such remote 'origin'
其中https://github.com/AndreaNobili/recipes.git是GitHub为该存储库提供的https链接。
为什么我会收到此错误消息?什么意味着没有这样的远程“起源”?如何解决此问题?
您使用的命令不是添加远程,而是设置现有远程的URL。您正在寻找的命令是
git remote add origin https://github.com/AndreaNobili/recipes.git
set-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
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句