git add -p allows you to create multiple commits from a situation where you
have applied different changes while developing (a new feature here, but also a
bug fix, and maybe some formatting, or changes to the CI configuration).
2 replies
What if you accidentally combined unrelated changes in one commit? There is a
way to split up these commits, but there is no reverse version of squash, it has
to be done manually. See the Splitting a commit section in the official Git
documentation. https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
Here again, when in rebase, git add -p is your friend.