Github常见错误

1、fatal: remote origin already exists

如果输入$ git remote add origin [email protected]:Violet-coco(github帐号名)/MyComic_serve(项目名).git 

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

    解决办法如下:

    1、先输入$ git remote rm origin;

    2、再输入$ git remote add origin [email protected]:Violet-coco/MyComic_server.git ,一般到这里,项目就不会报错了;

    3、如果输入$ git remote rm origin 还是报错的话,

         error: Could not remove config section 'remote.origin'.

          我们需要修改gitconfig文件的内容;

    4、找到你的git的安装路径,例如我的路径是F:\Web\Git\mingw64\etc;

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

猜你喜欢

转载自blog.csdn.net/weixin_38629529/article/details/82182395