git上传项目报错:fatal: remote origin already exists.

git上传项目到github报错:fatal: remote origin already exists.解决方案

 

在上传本地代码到github仓库时,有时候会出现以下报错:

$ git remote add origin https://github.com/Mr-Mei/VueDemo.git
fatal: remote origin already exists.

 

 

 

解决办法:

1.先移除
git remote rm origin

 

 

 

 

2.再次添加
git remote add origin https://github.com/Mr-Mei/VueDemo.git

 

 页面中可以看到,按照以上解决方法最后已经成功上传项目!!!!

posted on 2020-03-12 11:21  文艺小书生  阅读(239)  评论(0编辑  收藏  举报

导航