How do I manage conflicts with git submodules?

前端 未结 8 1055
死守一世寂寞
死守一世寂寞 2020-11-30 20:29

I have a git superproject that references several submodules and I am trying to lock down a workflow for the rest of the my project members to work within.

For this

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-30 20:35

    Well, its not technically managing conflicts with submodules (ie: keep this but not that), but I found a way to continue working...and all I had to do was pay attention to my git status output and reset the submodules:

    git reset HEAD subby
    git commit
    

    That would reset the submodule to the pre-pull commit. Which in this case is exactly what I wanted. And in other cases where I need the changes applied to the submodule, I'll handle those with the standard submodule workflows (checkout master, pull down the desired tag, etc).

提交回复
热议问题