Git

4、提示出错信息:fatal: remote origin already exists.

  • 先输入$ git remote rm origin

  • 再输入$ git remote add origin git@github.com:djqiang/gitdemo.git 就不会报错了

  • 如果输入$ git remote rm origin 还是报错的话,error: Could not remove config section 'remote.origin'. 我们需要修改gitconfig文件的内容

  • 找到你的github的安装路径,我的是C:\Users\ASUS\AppData\Local\GitHub\PortableGit_ca477551eeb4aea0e4ae9fcd3358bd96720bb5c8\etc

  • 找到一个名为gitconfig的文件,打开它把里面的[remote "origin"]那一行删掉就好了

posted @ 2019-03-19 18:52  Charlie大夫  阅读(60)  评论(0编辑  收藏  举报