Git Rebase
Git rebase moves a line of commits onto a different starting commit. Git replays the changes and gives each replayed commit a new ID.
Another example
A developer has private commits A–C while main has moved forward. Rebase creates A′–C′ on top of main and the tests pass. Rebasing a shared published branch rewrites history that other people may use.
Main parts
- 01old base
- 02replayed commits
- 03new commit IDs
Use it when
Use this term when moving or editing local commits after the team understands and agrees to the history rewrite.
Do not use it when
Do not rebase commits other people already use unless everyone clearly agrees to the rewrite.
Name used in code
git rebase [--onto|--interactive] upstream Before you ship
Before publishing, check the exact repository, branch, target, and diff. Keep unpublished work. Pass review and CI checks. Record conflict and data-loss risks, release order, traceability, recovery, and rollback.
Outcome: Use Git Rebase to release or recover the change safely, with a clear record. User context: A developer has private commits A–C while main has moved forward. Rebase creates A′–C′ on top of main and the tests pass. Rebasing a shared published branch rewrites history that other people may use. Delivery concept or operation: Git Rebase. Why it fits: Use this term when moving or editing local commits after the team understands and agrees to the history rewrite. Do not use it when: Do not rebase commits other people already use unless everyone clearly agrees to the rewrite. Delivery requirements: Name the code repository and target. List preconditions, changes, review and CI checks, conflict and data-loss risks, release order, and the rollback or recovery command. Repository safeguards: Keep unpublished work and a clear history. Do not run destructive steps without an explicit backup. Check the exact code diff and remote target before publishing. Acceptance criteria: Review the intended diff and pass all required checks. Keep the target version traceable. Practice failure recovery and keep published history clear. Evidence and limits (evidence boundary): It is official for that source. Other platforms or teams may use the term in another way. Unknowns to confirm: Repository, branch, team activity, release environment, approval owner, protected checks, and rollback target.
Check this request
Review the current use of Git Rebase. Definition: Git rebase moves a line of commits onto a different starting commit. Git replays the changes and gives each replayed commit a new ID. Release checks: Before publishing, check the exact repository, branch, target, and diff. Keep unpublished work. Pass review and CI checks. Record conflict and data-loss risks, release order, traceability, recovery, and rollback. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.