There are two steps. First merge and conflict are recreated. The second applies it to the new end of the branch.
You have something like this.
1 - 2 - 5 - 6 - 7 - 9 - 10 [A] \ / 3 - 4 - 8
7 is a merge fix, and you want to repeat this and apply corrections on top of A. Rebasing can become messy because too much work was put on top.
First, let it recreate the merger conflict. To do this, we just do it again. Place order 6, where A was when you merged, and combine it with 8.
git checkout 6 git merge 8
You will need to use git log --graph to determine the valid commit identifiers. Now we have a merge conflict. Allow it, as you would , but do not commit it . Put it in instead. git stash save . This will save the diff in the corner called "stash" . This is just a more formal way of saving patches.
Now that we have the resolution of the conflict, as it would be, check A and apply the fix from stash.
git checkout A git stash pop
Since there has been a change in A, you can get fresh conflicts from this. It's great. Allow them normally and commit.
source share