-
Switch to Branch2
git checkout Branch2
-
Apply the current (Branch2) changes on top of the Branch1 changes, staying
in Branch2:git rebase Branch1
Which would leave you with the desired result in Branch2:
a -- b -- c <-- Master
\
d -- e <-- Branch1
\
d -- e -- f' -- g' <-- Branch2
You can delete Branch1.