fatal: remote origin already exists解决方法

自己使用git 添加远程github仓库的时候输入了

git remote add origin https://github.com/AndyofJuly/andyofjuly.github.io.git

结果提示错误:fatal: remote origin already exists.

fatal: remote origin already exists解决方法
百度了一下,最后找到了解决办法,供大家参考:

1、先删除远程 Git 仓库(可直接复制下面命令)

git remote rm origin

2、再添加远程 Git 仓库(可直接复制以下非链接部分,然后再加自己的链接)

git remote add origin https://github.com/AndyofJuly/andyofjuly.github.io.git

最后成功上传(更新)远程仓库文件。如下图所示

fatal: remote origin already exists解决方法