Git · Rewriting and tagging

Interactive rebase

Reword, squash, reorder or drop commits before sharing them.

Syntax
git rebase -i HEAD~3

Example

Example
git rebase -i HEAD~3
# pick / reword / squash / drop

More in this group

git describe git rebase git rebase --abort git tag

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course