GitCheatSheet.org logo
Home / How To

Rebase the current branch

# Regular rebase
git rebase other-branch

# Interactive rebase
git rebase -i other-branch

Rewrites current branch's history so that it has all the commits of "other-branch" and then reapplies the changes in commits that were made in the current branch before the rebase. WARNING: since rebasing rewrites history, you should only use it on local branches.