假如當前在 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