You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/commands/sync.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ Use this block when passing `f sync` behavior to another agent:
13
13
- Default behavior: pull/sync only; push is off unless `--push`.
14
14
- Defaults: `--stash=true`, `--fix=true`.
15
15
- Modes: uses jj flow in healthy colocated workspaces, falls back to plain git when needed.
16
+
- Home-branch mode: when the current branch matches `jj.home_branch`, `f sync` skips the normal tracking pull and syncs `origin/<default-branch>` into that branch.
16
17
- Push target: configured `[git].remote` first, then standard fallback behavior.
17
18
- Clipboard output: synced commit list is copied only when remote commit ranges are detected (typically jj fetch path).
18
19
- Conflict note: jj can finish with unresolved conflicts and prints `jj resolve` guidance.
@@ -73,6 +74,25 @@ If an `upstream` remote exists (fork workflow), fetches and merges upstream chan
73
74
74
75
If no `upstream` remote but on a feature branch, syncs from `origin/<default-branch>` (e.g. `origin/main`) into the current branch.
75
76
77
+
### Home-branch mode
78
+
79
+
If the current branch matches the resolved `jj.home_branch`, Flow treats that branch as your
80
+
long-lived integration branch.
81
+
82
+
In that mode, `f sync`:
83
+
84
+
- skips the normal tracking-branch pull
85
+
- leaves branch tracking config untouched
86
+
- syncs `origin/<default-branch>` into the home branch
87
+
- keeps all non-home branches on the existing sync behavior
88
+
89
+
Home-branch resolution order is:
90
+
91
+
1.`<repo>/flow.toml``jj.home_branch`
92
+
2.`~/.config/flow/flow.toml``jj.home_branch`
93
+
3. basename of `$HOME`
94
+
4.`USER` or `USERNAME`
95
+
76
96
### Step 4: Push (optional)
77
97
78
98
Only when `--push` is passed:
@@ -120,6 +140,9 @@ Set in `flow.toml` under `[git]`:
120
140
```toml
121
141
[git]
122
142
remote = "origin"# default push remote
143
+
144
+
[jj]
145
+
home_branch = "alice"# optional long-lived personal integration branch
Copy file name to clipboardExpand all lines: docs/flow-toml-spec.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,6 +158,7 @@ fr = "f run"
158
158
-`[commit.skill_gate]`: optional required-skill policy for `f commit`; can enforce presence and minimum skill versions.
159
159
-`[invariants]`: optional policy checks for forbidden patterns, dependency allowlists, terminology context, and file-size limits. `mode = "block"` makes invariant warnings fail `f invariants` and commit-time invariant gate checks.
160
160
-`[git].remote`: preferred writable remote used by `f commit`/`f sync --push` (and jj remote defaults). Fallback order is `[git].remote`, then legacy `[jj].remote`, then `origin`.
161
+
-`[jj].home_branch`: optional long-lived personal integration branch. When the current branch matches it, `f sync` switches into home-branch mode and syncs `origin/<default-branch>` into that branch. Resolution order is repo `flow.toml`, then `~/.config/flow/flow.toml`, then the basename of `$HOME`, then `USER` / `USERNAME`.
0 commit comments