Skip to content
masterclass Buddy

DevOps · Command

git rebase

Interactive git rebase lets you rewrite a sequence of commits. You can reorder, edit, rename, combine, remove, or check commits before applying the changed history.

Last updated

Syntax

git rebase --interactive OTHER-BRANCH-NAME
git rebase --interactive HEAD~7

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • git rebase --interactive OTHER-BRANCH-NAME
  • git rebase --interactive HEAD~7
  • pick
  • reword
  • edit
  • squash
  • fixup
  • exec

Source: About Git rebase - GitHub Docs. Checked 2026-11-03.