阅读(3866) (46)

Git命令常见错误篇(九)

2017-09-06 09:42:38 更新

1、当你远程链接码云或者github社区时

git remote add origin git@github.com:WadeLeng/hello-world.git

错误提示:fatal: remote origin already exists.

解决办法:

git remote rm origin

然后在执行:

git remote add origin git@github.com:WadeLeng/hello-world.git

就不会报错误了

2、当你提交上传代码到仓库中时

git push origin master

错误提示:error:failed to push som refs to

解决办法:

git pull origin master 

先把远程服务器github上面的文件拉先来,再push 上去。