Github 使用中出现的问题解决方法

1.在执行

$ git remote addorigin git@github.com:defnngj/hello-world.git

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

解决办法:

$ git remote rm origin

然后在执行:

$ git remote add origin git@github.com:xxxx/hello-world.git 就不会报错误了

2. 在执行

$ git push origin master

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

解决办法:

$ git pull origin master //先把远程服务器github上面的文件拉先来,再push 上去。

  

posted @ 2013-06-12 23:01  OpenSoucre  阅读(193)  评论(0编辑  收藏  举报