What
Interactive rebase to squash, reorder, or edit recent commits.
Why
Clean commit history before submitting PRs. Combine related commits or fix mistakes.
How
git rebase -i HEAD~N
Replace N with the number of commits to edit. In the editor:
squash/s: combine with previous commitdrop/d: remove commitreword/r: edit commit messagepick/p: keep commit as-is