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