Using Git how to merge a subtree from remote branch
Here’s the question:
- Git subtree push always fails
- git subtree push changes back to subtree project
- What are git subtree push assertions?
- Git Submodule/Subtree specific folders/projects
- Git confused when merging an update into my subtree
- “submodules” in git: braid or subtree or something else
How to make the subtree pull from a different remote branch like “stable” or “integrate”?
FYI, we have a
subtree "push" working as a script. In fact, it can even push the subtree to the specific branch of our choice on the remote repository.
Does anybody know how to do the reverse on a pull or even have a clue?
The simple pull works like this:
git pull -s subtree remotebranch
One idea that can be tried: Maybe a 2-step process will do the trick.
- The remote branch gets pulled from remote repository branch like “
stable” and then
- do the
git subtree pullto
One Solution collect form web for “Using Git how to merge a subtree from remote branch”
May be (not tested) the git subtree script tool may help here.
See its man page
It can merge/pull a subproject in your own repo, but it may concern all branches, so your two-step process could still be needed.