| name | rebase |
| description | Use `mt rebase` to rebase the current branch onto `origin/<base>`, especially in shallow sandbox checkouts. |
Mighty: Rebase Current Branch
Use this when the current branch needs the latest origin/main (or another base branch), especially inside Mighty sandboxes that start from a shallow checkout.
Workflow
-
Confirm the worktree is clean:
-
Run the narrow helper:
mt rebase
- Or
mt rebase --base <branch>
-
If git reports conflicts, resolve them with normal git rebase flow:
git status
git rebase --continue
git rebase --abort
-
If you need the rewritten branch on the remote, push it yourself:
git push --force-with-lease
Notes
mt rebase widens shallow history before ancestry-aware git operations.
- It only targets the
origin remote in this scope.
- Rebase rewrites git SHAs but does not redefine Mighty's durable workstream lineage; checkpoint IDs remain the rewrite-safe anchors beneath restore, publish, and evidence flows.
- After rebase or other rewrite, re-run
mt prime if you lost context and keep using mt commands rather than stale SHAs to recover the current workstream state.
- It does not push or create a PR. Use
mt pr separately after the branch is ready.
- If post-rewrite hooks only change
.mighty relink state, mt rebase auto-commits those changes.