本文转载自:http://blog.csdn.net/dengjianqiang2011/article/details/9260435
如果输入$ git remote add origin git@github.com:djqiang(github帐号名)/gitdemo(项目名).git
提示出错信息:fatal: remote origin already exists.
解决办法如下:
1、先输入$ git remote rm origin
2、再输入$ git remote add origin git@github.com:djqiang/gitdemo.git 就不会报错了!
3、如果输入$ git remote rm origin 还是报错的话,error: Could not remove config section 'remote.origin'. 我们需要修改gitconfig文件的内容
4、找到你的github的安装路径,我的是C:UsersASUSAppDataLocalGitHubPortableGit_ca477551eeb4aea0e4ae9fcd3358bd96720bb5c8etc
5、找到一个名为gitconfig的文件,打开它把里面的[remote "origin"]那一行
删掉就好了!
最后
以上就是可耐小白菜最近收集整理的关于github常见操作和常见错误!错误提示:fatal: remote origin already exists.的全部内容,更多相关github常见操作和常见错误!错误提示:fatal:内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复