git rebase -i HEAD~3

Category: Git - Core

git rebase -i HEAD~3

Interactive rebase for the last 3 commits

Opens an interactive editor to rewrite the last 3 commits — reorder, combine (squash), or edit their messages.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.