Rebase

Replay your commits on top of the newest version of another branch, giving a straight history.

GitHub

Example

git fetch origin
git rebase origin/main

Never rebase commits others already pulled; it rewrites history.

Related

← Push Updated 2026-11-26