我在 GitHub 上的某个位置有我的项目,[email protected]:myname/oldrep.git
.
现在我想将所有代码推送到其他位置的新存储库,[email protected]:newname/newrep.git
.
我使用了命令:
git remote add origin [email protected]:myname/oldrep.git
但我收到这个:
致命:远程源已存在。
您收到此错误是因为“原点”不可用。 “origin”是一个约定,不是命令的一部分。 “origin”是远程存储库的本地名称。
例如你也可以写:
git remote add myorigin [email protected]:myname/oldrep.git
git remote add testtest [email protected]:myname/oldrep.git
请参阅手册:
http://www.kernel.org/pub/software/scm/git/docs/git-remote.html
要删除远程存储库,请输入:
git remote rm origin
同样,如果您想要,“origin”是远程存储库的名称
删除“上游”遥控器:
git remote rm upstream
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)