Change git history and branch

38 Views Asked by At

I have 2 branches which is created at the same time from master branch. Both has been merged to master after changes. Branch history look like below:

My git structure

I want to change the structure so that Branch2 should be created from master that Branch 1 already merged. I want to change the structure to this:

I want

Is it possible to change the git history from image 1 to image 2?

1

There are 1 best solutions below

0
Aous Mohammad On

Read about branch rebasing, and after that you can go to your branch2 and rebasing it with master