I have the following structure in my repo:
|-commit9 [bugfix]
|-commit8
|-commit7
|-commit6
|-commit5 [branch-2]
|-commit4
|-commit3
|-commit2 [branch-1]
|-commit1
o-master
The bugfix is applied on top of other commits. How do I move the commit8
and commit9
to an earlier point, for example, immediately on top of master
?
I followed the instructions in here: How to inject a commit between some two arbitrary commits in the past? and now my repo looks as follows:
|-commit7
|-commit6
|-commit5
|-commit4
|-commit3
|-commit2
|-commit1
|-commit9 [bugfix]
|-commit8
| |-commit9 [bugfix]
| |-commit8
| |-commit7
| |-commit6
| |-commit5 [branch-2]
| |-commit4
| |-commit3
| |-commit2 [branch-1]
| |-commit1
|/
o-master
So commit8
and commit9
are where I intended originally, but the rest of the commits are duplicates and I don't have the branch names of course.
How do I get a "linear" history now?