Git 提示fatal: remote origin already exists 错误解决办法

允我心安 提交于 2020-01-23 10:28:23

1、先删除远程 Git 仓库

git remote rm origin

 

2、再添加远程 Git 仓库

git remote add origin https://github.com/XXXXXXXXXXX/design-patterns.git

 

注: 如果执行 git remote rm origin 报错的话,我们可以手动修改gitconfig文件的内容

        vi .git/config

        把 [remote “origin”] 那一行删掉就好了。

注:若出现“Updates were rejected because the tip of your current branch is behind

       本博客这篇有讲如何解决? https://www.cnblogs.com/651434092qq/p/11015806.html

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!