if I have a workspace looks like this:
oliver-koo-C02WC0EJHTDG:foo oliver.koo$ git log --all --decorate --oneline --graph
* f528ce3 (HEAD -> master) someone else made a change
| * 447855b (feature1.2) feature 1.2
| | * f3e4d2f (feature-1.1) create feature 1.1
| |/
| * b04c5c6 (feature-1) create feature 1 core
|/
* 06a8ddb (origin/master, origin/HEAD) Update stuff
and each branch track's parent branch like so:
oliver-koo-C02WC0EJHTDG:foo oliver.koo$ git branch -vv
feature-1 b04c5c6 [master: ahead 1, behind 1] create feature 1 core
feature-1.1 f3e4d2f [feature-1: ahead 1] create feature 1.1
feature1.2 447855b [feature-1: ahead 1] feature 1.2
* master f528ce3 [origin/master: ahead 1] someone else made a change
is there a way (or even possible) to recursively merge master into all the child branch without checking out each child branch and do a git merge master
?
Note:
- This answer suggest using
git fetch . master:feature-x
wouldn't work since these are non fast-forward merge
oliver-koo-C02WC0EJHTDG:foo oliver.koo$ git fetch . master:feature-x
From .
! [rejected] master -> feature-x (non-fast-forward)
I know achieve similar result with rebase without checkout (
git rebase master feature-x
). but I want to use merge.I been thinking alternative using
git cherry-pick A^..B
but again is it possible to apply cherry-picked commits to a branch without checking it out?