git rebase --interactive HEAD~2
pick b76d157 b
pick a931ac7 c
- press insert to enter edit mode
- mark commits to squash replacing
pickbysorsquash - leave the first commit as
pick - to save and exit press ESC then type
:wq(write quit)
pick b76d157 b
s a931ac7 c
- press insert to enter edit mode
- edit the commit message
- to save and exit press ESC then type
:wq(write quit)
# after that just edit the commit message
# This is a combination of 2 commits.
# The first commit's message is:
b
# This is the 2nd commit message:
c