git rebase
Rewrite Git history — move commits, combine them, change order.
Alternative to merge: git rebase main places your feature branch on top of main instead of creating a merge commit. Interactive (-i) lets you squash, edit, drop. Never rebase shared branches — only your own.