I have a submodule on a different branch (branch-with-submodule) and currently on a branch without one (branch-without-submodule) as such.
---(Commit that adds submodule)-A-B-[branch-with-submodule] \ --C-[branch-without-submodule*] What can I do if I want the submodule in the current branch? I guess I can just cherry-pick the commit that adds the submodules but what if there are many other modifications in that commit (say, there are multiple submodules) and I only need one particular submodule?
Is there any way to achieve this without manually adding the git submodule again? Perhaps using checkout?