git pull時解決分支分叉(branch diverged)問題


git pull時出現分支沖突(branch diverged)

$ git status

# On branch feature/worker-interface

# Your branch and 'origin/br_dev' have diverged,

# and have 1 and 4 different commit(s) each, respectively.

解決辦法:
1、查看哪個commit沖突
git cherry origin/br_dev

2、回退到沖突的前一個commit
git reset --hard <commitID>

3、更新代碼
git pull


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM