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: GUIDELINES.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,6 +127,14 @@ All human-facing output (progress lines, prompts, summaries, errors) goes to std
127
127
128
128
Arborist maintains no state files beyond the `.arb/` marker directory, `.arbws/config` in each workspace, and git's own metadata. Workspaces are discovered by scanning for directories containing `.arbws`. Repos are discovered by scanning `.arb/repos/` for directories containing `.git`. This makes the state inspectable, debuggable, and impossible to corrupt through arb bugs alone.
129
129
130
+
### Mutating commands fetch by default, read-only commands do not
131
+
132
+
State-changing commands (`pull`, `push`, `rebase`, `merge`) automatically fetch from all remotes before assessing the workspace. This ensures operations are based on the latest remote state, preventing mistakes like rebasing onto a stale base branch. Use `--no-fetch` to skip when refs are known to be fresh.
133
+
134
+
Read-only commands (`status`, `list`) do not fetch by default to stay fast for frequent use. Both support `--fetch` to opt in when fresh remote data is needed.
135
+
136
+
The parallel pre-fetch also serves a performance purpose: `parallelFetch()` fetches all repos concurrently, while the subsequent mutation operations (pull, push, rebase, merge) run sequentially one repo at a time. Batching the network I/O upfront avoids per-repo fetch latency during the sequential phase.
137
+
130
138
### Repo classification: local vs remote
131
139
132
140
`classifyRepos()` separates repos into those with remotes and local-only repos. Commands that interact with remotes (fetch, pull, integrate) use this to gracefully skip local repos with a reason. This allows mixed local/remote workspaces.
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -188,7 +188,7 @@ arb pull
188
188
arb rebase
189
189
```
190
190
191
-
If a rebase hits conflicts, arb continues with the remaining repos and reports all conflicts at the end with per-repo resolution instructions. This way you see the complete state of all repos in one pass instead of re-running for each conflict. If you re-run while a repo is still mid-rebase, it is automatically skipped. Prefer merge commits? Use `arb merge` instead — same workflow, uses `git merge`.
191
+
Arb automatically fetches all repos before rebasing, so you always rebase onto the latest remote state. If a rebase hits conflicts, arb continues with the remaining repos and reports all conflicts at the end with per-repo resolution instructions. This way you see the complete state of all repos in one pass instead of re-running for each conflict. If you re-run while a repo is still mid-rebase, it is automatically skipped. Prefer merge commits? Use `arb merge` instead — same workflow, uses `git merge`.
192
192
193
193
Arb auto-detects each repo's default branch, so repos using `main`, `master`, or `develop` coexist without extra configuration.
194
194
@@ -199,6 +199,8 @@ arb push
199
199
arb push --force
200
200
```
201
201
202
+
All state-changing commands (`rebase`, `merge`, `push`, `pull`) automatically fetch before operating, ensuring they work with the latest remote state. Use `--no-fetch` to skip when refs are known to be fresh. Read-only commands (`status`, `list`) do not fetch by default — use `--fetch` to opt in. If fetching fails (e.g. offline), the command warns and continues with stale data.
203
+
202
204
All commands show a plan before proceeding. See `arb help <command>` for options.
"List all workspaces in the arb root with aggregate status. Shows branch, base, repo count, and status for each workspace. The active workspace (the one you're currently inside) is marked with *. Use --quick to skip per-repo status gathering for faster output.",
29
+
"List all workspaces in the arb root with aggregate status. Shows branch, base, repo count, and status for each workspace. The active workspace (the one you're currently inside) is marked with *. Use --quick to skip per-repo status gathering for faster output. Use --fetch to fetch all repos before listing for fresh remote data.",
27
30
)
31
+
.option("-f, --fetch","Fetch all repos before listing")
28
32
.option("-q, --quick","Skip per-repo status (faster for large setups)")
.option("--fetch","Fetch all repos before merging")
8
+
.option("-F, --no-fetch","Skip fetching before merge")
9
9
.option("-y, --yes","Skip confirmation prompt")
10
10
.summary("Merge the base branch into feature branches")
11
11
.description(
12
-
"Merge the base branch (e.g. main) into the feature branch for all repos, or only the named repos. Shows a plan and asks for confirmation before proceeding. Repos with uncommitted changes or that are already up to date are skipped. If any repos conflict, arb continues with the remaining repos and reports all conflicts at the end with per-repo resolution instructions.",
12
+
"Fetches all repos, then merges the base branch (e.g. main) into the feature branch for all repos, or only the named repos. Shows a plan and asks for confirmation before proceeding. Repos with uncommitted changes or that are already up to date are skipped. If any repos conflict, arb continues with the remaining repos and reports all conflicts at the end with per-repo resolution instructions. Use --no-fetch to skip fetching when refs are known to be fresh.",
.option("-f, --force","Force push with lease (after rebase or amend)")
30
+
.option("--no-fetch","Skip fetching before push")
29
31
.option("-y, --yes","Skip confirmation prompt")
30
32
.summary("Push the feature branch to the publish remote")
31
33
.description(
32
-
"Push the feature branch for all repos, or only the named repos. Pushes to the publish remote (origin by default, or as configured for fork workflows). Sets up tracking on first push. Shows a plan and asks for confirmation before pushing. Skips repos without a remote and repos where the remote branch has been deleted. Use --force after rebase or amend to force push with lease.",
34
+
"Fetches all repos, then pushes the feature branch for all repos, or only the named repos. Pushes to the publish remote (origin by default, or as configured for fork workflows). Sets up tracking on first push. Shows a plan and asks for confirmation before pushing. Skips repos without a remote and repos where the remote branch has been deleted. Use --force after rebase or amend to force push with lease. Use --no-fetch to skip fetching when refs are known to be fresh.",
.option("--fetch","Fetch all repos before rebasing")
8
+
.option("-F, --no-fetch","Skip fetching before rebase")
9
9
.option("-y, --yes","Skip confirmation prompt")
10
10
.summary("Rebase feature branches onto the base branch")
11
11
.description(
12
-
"Rebase the feature branch onto the updated base branch (e.g. main) for all repos, or only the named repos. Shows a plan and asks for confirmation before proceeding. Repos with uncommitted changes or that are already up to date are skipped. If any repos conflict, arb continues with the remaining repos and reports all conflicts at the end with per-repo resolution instructions.",
12
+
"Fetches all repos, then rebases the feature branch onto the updated base branch (e.g. main) for all repos, or only the named repos. Shows a plan and asks for confirmation before proceeding. Repos with uncommitted changes or that are already up to date are skipped. If any repos conflict, arb continues with the remaining repos and reports all conflicts at the end with per-repo resolution instructions. Use --no-fetch to skip fetching when refs are known to be fresh.",
0 commit comments