1

I have a repository with multiple branches besides master and while it is not public I would like to re-write the very first commit (update dependencies versions in a build script). If I only had one branch I would simply git rebase -i -r --root, and amend changes to root commit. The problem is that it rebases only current branch while others still point to the history with an old root.

              B11-B12 (feature1)
             /
root-M2-M3-M4-M5-M6 (master)
         \
          B21-B22-B23 (feature2)

How can I change root commit and re-assign all branches to corresponding commits in a history with a new root?

phd
  • 69,888
  • 11
  • 97
  • 133
Kirill
  • 5,080
  • 2
  • 38
  • 68

0 Answers0