Dotty git sync
dotty git sync¶
Fetch trunk, clean merged layers, refresh PR maps, rebase+resign if diverged.
Synopsis¶
Synchronise the current stack with trunk:
- Fetch upstream/origin
- Drop layers already on trunk — including one that landed by fast-forward, which only its PR state distinguishes from an empty layer sitting at the trunk tip (default: delete local + origin branches)
- If any open layer diverged from trunk — or no longer contains the layer below it, because new commits landed mid-stack — prompt to rebase the open stack and re-sign each rewritten layer (use --continue / --abort around conflicts)
- Force-with-lease push the rewritten branches and return to the branch the sync started on
- Rewrite any open PR whose title or body is stale — a stacked layer owns both, so they come from the commit that layer nominated; amend it to change a description, rather than editing the PR on GitHub
Config: git config dotty.stack.cleanup false # keep merged branches
Examples¶
Options¶
--abort abort an in-progress stack rebase
--continue resume after resolving rebase conflicts
-h, --help help for sync
-y, --yes rebase+resign without prompting when diverged
Options inherited from parent commands¶
SEE ALSO¶
- dotty git - Git helpers built on dotty's commit signing.