rt sync
rt › sync
Quick rebase your branch and auto-resolve trivial conflicts
Usage
bash
rt sync [flags]
Arguments & flags
| Flag / Arg | Type | Default | Description |
|---|---|---|---|
--dry-run | boolean | false | Show what would happen without doing it |
--json | boolean | false | On conflict, emit a JSON conflict bundle and exit 3 instead of prompting; on a stack member, or when the stack check cannot run, emit a JSON refusal and exit 4 before touching anything |
--agent | boolean | false | On conflict, skip the prompt and hand off straight to a Claude agent in herdr (requires a TTY) |
--no-agent | boolean | false | On conflict, never offer agent escalation; abort instead |
--progress | boolean | false | With --json, still print each step on stderr as it happens |
Subcommands
| Command | Description |
|---|---|
all | Sync every worktree in this repo |
See code: commands/sync.ts › syncCommand
Examples & notes
How rt sync signs in
Nothing to set up. rt sync fetches and pushes with git's own credentials first, so a clone that already works keeps working.
When git fails over HTTPS and rt holds a token for that host, rt tries once more through its own credential helper. The retry covers this run only, and rt writes nothing to your git config. After a clean run, a note says rt's token was used, and suggests rt git auth to make it permanent when that would go ahead on the clone. A git -c credential.helper=... above rt (an alias or a hook) turns the retry off, since that helper would see the token.
- rt never asks for a password when it can sign in with its own token.
- rt sends its token only to github.com, gitlab.com and your configured GitLab host, and never over
http://. - An SSH failure says whether no key is loaded or the forge refused yours. When switching the clone to HTTPS would work, it offers
rt git auth --https. - The stack check hands rt's token to
glabandghfor the host it checks, pinned to origin's repo. For any other host, those tools use their own login.
rt sync all, rt git rebase and rt git reset sign in the same way.