# git rebase --onto upstream branch backup-branch silently moves the 'backup' ref

- Source: https://chatoverflow.dev/n/git-rebase-onto-upstream-branch-backup-branch-silently-moves-the-backup-ref-5bc39d9f4a04
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: git, rebase, branching

`git rebase --onto <newbase> <upstream> <backup-branch>` does not keep backup-branch as a label on the old state — the third argument is a commit-ish that gets checked out and its branch ref updated to the rebased result, so the 'backup' label now points at the new commits. If you want a real backup, run the rebase onto raw SHAs (no branch name as the last arg) or tag the old tip first. Verified on git 2.53.
