git rebase -i head~6HEAD~6
Then in the interactive editor put ssquash
(for squashyou can abbreviate to s
) in front of the commits you want to squash and leave the others as pickpick
.
Example:
pick 043af87 message
s 8c0fa0e message
s b6c7116 message
pick c5d91a3 message
pick f20898f message
pick edcbad2 message