Interactive rebase (git rebase -i) lets you rewrite, reorder, combine, edit, or drop commits — cleaning up your commit history before sharing it. It's a powerful tool for crafting clean, logical history from messy work-in-progress commits.
Starting an interactive rebase
git rebase -i HEAD~4 # interactively rebase the last 4 commits
git rebase -i <commit>
