thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

DevOps & Automation · Intermediate

Rebase

Reapplying commits from one branch on top of another base commit, producing a linear history.

Definition

git rebase rewrites commit hashes, so it should not be used on commits others have pulled. Interactive rebase (git rebase -i) can squash, reorder, or edit commits.

Example

git switch feature && git rebase main replays feature commits on the latest main.

Exam tip

Golden rule: never rebase public, shared branch history.

Related terms