今天git连接远程库的时候出现fatal: remote origin already exists. 这个错误

大概是之前连接过别的库吧

然后我们的解决办法就是删除之前的连接

1.删除git远程仓库

$ git remote rm origin

2.再次添加远程仓库

git remote add origin git@github.com:project/project.git

如果这样并没有解决,那就手动删除远程仓库

vim .git/config

git 提示:fatal: remote origin already exists. 错误解决

删除 [remote "origin"]这一行

 

相关文章:

  • 2021-12-20
  • 2022-12-23
  • 2021-11-30
  • 2021-09-12
  • 2022-12-23
  • 2021-06-08
猜你喜欢
  • 2021-11-30
  • 2021-04-09
相关资源
相似解决方案