0

I have some branches:

Branch A -> B
         -> C
         -> D
         -> E

I need to fix something on branch A, how am I able to apply the fix to all branches branched out from branch A without I need to cherrypick the fix to all branches B, C, D, and E?

Rendy
  • 5,572
  • 15
  • 52
  • 95
  • There is no out-of-the box way to do this (I could be wrong). You will need to update all of the branches manually (whether it be rebasing, cherry-picking, or merging). – Whymarrh Nov 10 '17 at 03:03
  • 1
    Possible duplicate of [Rebasing a branch including all its children](https://stackoverflow.com/questions/5600659/rebasing-a-branch-including-all-its-children) – Whymarrh Nov 10 '17 at 03:04
  • Refer to [Commit to multiple branches at the same time with git](https://stackoverflow.com/q/4532063/6521116) – LF00 Nov 10 '17 at 03:08
  • As @Whymarrh says or patching. E.g. after the commit in A, when you are on B or C, etc, you can `git merge A` which will bring the changes from A. Or, you can create a patch form that commit and apply it, but it still needs to be applied individually to each of B, C, D, etc. – marekful Nov 10 '17 at 03:09
  • Possible duplicate of [Commit to multiple branches at the same time with git](https://stackoverflow.com/questions/4532063/commit-to-multiple-branches-at-the-same-time-with-git) – phd Nov 10 '17 at 06:00
  • Is C a child branch of B, and D a child branch of C, and so on? This sounds odd. In any case, check out A, apply the commit, merge A into B, C, D, E, etc. – Lasse V. Karlsen Nov 10 '17 at 09:12
  • Oops sorry @LasseVågsætherKarlsen , please see my edited post – Rendy Nov 10 '17 at 09:29
  • My comment still stands, check out A, apply the commit, merge A into B, C, D, E, etc. – Lasse V. Karlsen Nov 10 '17 at 20:54

0 Answers0