Auto-Sync
Auto-sync keeps a change request's source branch up to date with its target branch. When the target branch receives new commits (a push or a merge), the platform automatically updates the source branch so the CR never drifts far from what it is based on.
How It Works
Every open or draft change request has a sync strategy that controls how it stays in sync. When the target branch advances, the source branch is updated using the configured strategy:
- Merge (default) — The target branch is merged into the source branch, adding a merge commit on the source branch while preserving both histories.
- Rebase — The source commits are replayed on top of the latest target commits. The source branch ref moves to the new rebased tip, producing a linear history. Note that rebasing rewrites commit hashes.
- Manual — Nothing happens automatically. The CR is marked as needing a manual sync, and the author updates the source branch themselves.
The default sync strategy is configured in repository settings and can be overridden per change request when creating or editing a CR. See Merge Strategies for the difference between merge and rebase.
When a Sync Happens
A CR is synced when its target branch is updated. After a CR is synced, any downstream CRs that target the same source branch are synced in turn, so changes cascade through a stack of change requests.
Conflicts
If the sync cannot be applied cleanly because the source and target branches changed the same lines, the sync is skipped:
- The source branch is left untouched — no commits are made on your behalf.
- The CR records the failure and shows a conflict count.
- You resolve the conflict locally (fetch, rebase or merge onto the latest target), then push the source branch to clear the conflict.
When a Sync Does NOT Happen
- Shared source — If the same source branch is used by change requests targeting different branches, it is not auto-synced. Syncing it for one target could break another, so the CR is left as-is and any conflict count is still updated.
- Stack merges — Change requests merged together as part of a stack merge are not auto-synced during the merge itself.
Sync Status on the CR
The CR page shows the current sync strategy, whether the branch is up to date with its target,
and any conflict count. Automated sync activity appears in the discussion thread, such as a Sync completed. message after a successful sync or an Auto-sync failed message when a sync could not
be applied.
Using Auto-Sync
- Choose the default sync strategy in repository settings, or set it per change request when creating or editing the CR.
- Keep working on your source branch as usual. After each target update, check the CR page to confirm the branch was synced or to see any conflict.
- If a sync fails, resolve the conflict in your local clone, rebase or merge onto the latest target, and push the source branch. The conflict clears and the CR can proceed to review and merge.