When the commit log message begins with "squash! …" (or "fixup! …"), and there is already a commit in the todo list that matches the same ...
,
automatically modify the todo list of rebase -i so that the commit marked for squashing comes right after the commit to be modified,
and change the action of the moved commit from pick
to squash
(or fixup
).
— Git - git-rebase Documentation