Git命令常見錯誤篇(九)

2019-02-27 11:43 更新

1、當你遠程鏈接碼云或者github社區(qū)時

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

錯誤提示:fatal: remote origin already exists.

解決辦法:

git remote rm origin

然后在執(zhí)行:

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 上去。

以上內容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號