文章内容
2018/12/21 16:05:01,作 者: 黄兵
fatal: remote origin already exists.
最近迁移新库,但是在添加新库的时候,如下提示:
fatal: remote origin already exists.
出现这个错误的原因:
git 配置文件已经存在 remote origin地址。
解决方案:
删除配置文件的remote origin地址,之后重新写入。
1、先删除远程库地址:
git remote rm origin
2、添加远程库地址:
git remote add origin git@github.com:
之后再次执行提交等相关命令:
git add . git commit git push -u origin master
黄兵个人博客远程。
评论列表