git rebase interactive command
When rebasing commit history via git rebase -i we can use the following command. Example use-case # In the todo list: edit abc1234 Fix typo Here are the most useful commands for removing or modifying commits : When you run git rebase -i , Git opens a todo list where each commit is prefixed with a command. These are the commands you can use (aliases in parentheses): Command Alias What it does pick p Apply the commit as-is (default) reword r Apply commit, but pause to edit only the commit message edit e Apply commit, then pause so you can change files and run git commit --amend squash s Combine this commit into the one above it & merge both commit messages fixup f Combine this commit into the one above it & discard this commit's message drop d Delete the commit entirely break b Pause the rebase here (useful for manual testing before continuing) exec x Run a shell command at this point in the history label / reset / merge l / t / m Advanced commands for complex rebases ...