Git本地仓库与远程github同步的时候提示fatal: remote origin already exists 错误解决办法

Git本地仓库与远程github同步的时候提示fatal: remote origin already exists 错误解决办法

1、git在本地的电脑创建了仓库,要远程同步github的仓库。使用命令:$ git remote add origin https://github.com/yuanchaoyong/wxtest.git

报如下错误:

可以知道其实本地已经同步过一次的github版本库了。需要把原先的删除

2、先删除远程 Git 仓库

$ git remote rm origin

3、再添加远程 Git 仓库,成功

 

posted @ 2019-03-15 15:31  晴空~万里  阅读(1325)  评论(0编辑  收藏  举报