git管理工具sourceTree使用問題總結

一、其他同事更改了其分支名稱名同步到了遠端,導致自己這邊pull的時候報錯

error:cannot lock ref 'xx/xxx/xxx' : ref xxx/xxx/xxx is at <hash code1> but except <hash code2>

(unable to  update local ref)

這時候可以選擇更新下遠端的分支結構,有一些修改或者刪除過的會進行更新,

終端cd到工程目錄下,命令爲:git remote prune origin。

如果還pull失敗的話可以用:git update-ref -d <hashcode> 來刪除無用的那個hashcode。

 

二、提交推送提示Updates were rejected because the tag already exists in the remote.

提交的時候去掉這個勾選即可。

 

 

持續更新....

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章