![]() ![]() Option 2:ĭo an interactive rebase in the upper (outer-most) repo: # pull latest upstream main repo Then, when done with the conflict resolution, manually cd into each submodule, pull or check out your latest changes you want, then cd back up into the upper repo, and run git add path/to/submodule for each submodule. Like the main answer: # run this for each conflicting submodule How to resolve conflicts with git submodules, in your outer repo containing them Option 1: On the other hand you if switch submodule refs frequently you may have to put up with a lot of conflict resolving. If the two different branches continue to track the same respective submodule refs after successive merges, then git should be able to work out the pattern without raising merge conflicts in future merges. But the submodule ref is just like any other component of your project. This is a tricky aspect of tracking different versions of a submodule in different branches of your project. Which is exactly what you are doing with the reset command. ![]() If that is the case, then you need to select the ref that you want and commit that change to resolve the conflict. It looks like because the master and one.one branches of supery contain different refs for the subby submodule, when you merge changes from master git does not know which ref - v1.0 or v1.1 - should be kept and tracked by the one.one branch of supery. But I have a guess about the trouble you are encountering. ![]() How do I delete/ignore the unwanted submodule references and commit my conflicts and changes? Or is there a parameter I can use with my original git pull that will ignore my submodules? masterĬONFLICT (submodule): Merge conflict in subby - needs qu3rty.321eĪutomatic merge failed fix conflicts and then commit the results. master while in the subby branch, it looks like it creates additional submodules.īefore the pull/merge, I get the desired response from git submodule from the one.one branch: $ git checkout masterīut after the pull, it adds additional submodules when I run git submodule: $ git pull. I can work within each of these branches without a hitch, but if I try to update the one.one branch with changes from the master branch I receive some conflicts and I don't how to resolve them.īasically after running a git pull. The branch of supery called one.one and changed the reference of the submodule to point to the tag v1.1 of subby. My master branch of supery has the tag v1.0 of the git project subby referenced as a submodule. (Then is a simplification of what I'm trying to do.I'm not actually using the branches for versions, but I thought it would be easiest to lay out as a question.) 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.įor this question, lets say my superproject is called supery and the submodule is called subby. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |