Git 合並時 submodule 沖突問題解決方法


假如當前在 branchA,在執行 git merge branchB 時,可能會遇到子倉庫文件沖突

可以嘗試一下命令:

git update-index --cacheinfo 160000 <commit-hash> "<子倉庫path>"

 

其中 <commit-hash> 改為 branchA 對應子倉庫的 commit 哈希值

其中 <子倉庫path> 為在 .gitmodules 配置的子倉庫 path

 

關於 git update-index 的用法詳見:https://cloud.tencent.com/developer/section/1138784

 


免責聲明!

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



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