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

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

原文地址:https://www.cnblogs.com/meijifu/p/12467934.html