Posted at

Git | fixup / squash in reverse order with $ git rebase --interactive


A story about rebasing in interactive mode.

For example, if you have a commit like this:

 pick 77335c9 Commit A pick d850545 Commit B 

I don't want to dissolve B in A.

 Commit A ⇡ Commit B 

I want to dissolve A into B.

 Commit A ↓ Commit B 


At that time, first replace the text up and down.

 pick d850545 Commit B pick 77335c9 Commit A 

Next, specify fixup (or squash).

 pick 77335c9 Commit A f d850545 Commit B