fatal: remote origin already exists. 报错解决方法

当我们首次在本地提交vue项目到gitee中使用命令

git remote add origin https://gitee.com/my26350352/vue_travel.git

报错信息:fatal: remote origin already exists.(远程仓库不存在)
原因:
可能是你之前创建了同名的仓库,后来被删除了,当你重新创建相同名字的仓库提交代码就会这样提示
解决方法,我们可以使用命令删除远程 Git 仓库,然后使用命令添加一次就可以了

1、先删除远程 Git 仓库
git remote rm origin
2、再添加远程 Git 仓库
git remote add origin https://gitee.com/my26350352/vue_travel.git
3.最后提交代码
git push -u origin master
原文地址:https://www.cnblogs.com/qingheshiguang/p/14780066.html