git rebase

SPLITTING COMMITS

In interactive mode, you can mark commits with the
action “edit”. However, this does not necessarily
mean that git rebase expects the result of this
edit to be exactly one commit. Indeed, you can
undo the commit, or you can add other commits.
This can be used to split a commit into two: