Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

docs: Standardize "main worktree" and "default branch"

Maximilian Roosaaf8f732ca49
diff --git a/CLAUDE.md b/CLAUDE.md
index e535e8e19..e3eba3f68 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -32,6 +32,15 @@ Example of escalating instead of suppressing:
fn parse_config() { ... }
```
+## Terminology
+
+Use consistent terminology in documentation, help text, and code comments:
+
+- **main worktree** — when referring to the primary worktree (the original git directory)
+- **default branch** — when referring to the branch (main, master, etc.)
+
+Avoid mixing: "main/default branch worktree" is confusing. Use "main worktree" for worktrees and "default branch" for branches.
+
## Testing
### Running Tests
diff --git a/README.md b/README.md
index 934a57a2b..4aedb14fe 100644
--- a/README.md
+++ b/README.md
@@ -202,7 +202,7 @@ Automate setup and validation at worktree lifecycle events:
| --------------- | ----------------------------------- | ---------------------------- |
| **post-create** | After worktree created | `cp -r .cache`, `ln -s` |
| **post-start** | After worktree created (background) | `npm install`, `cargo build` |
-| **pre-commit** | Before squash commit created | `pre-commit run` |
+| **pre-commit** | Before creating any commit | `pre-commit run` |
| **pre-merge** | After squash, before push | `cargo test`, `pytest` |
| **post-merge** | After successful merge | `cargo install --path .` |
@@ -794,7 +794,7 @@ branch `foo` has a different worktree at `repo.bar/`, an error is raised.
- `@` - current worktree (by path, works in detached HEAD)
- `-` - previous worktree (from switch history)
-- `^` - main/default branch worktree
+- `^` - main worktree
### Branch deletion
@@ -973,7 +973,7 @@ Note: `locked` and `prunable` are top-level fields on worktree objects, not in s
**Worktree position fields** (for identifying special worktrees):
-- `is_main`: boolean - is the main/default worktree
+- `is_main`: boolean - is the main worktree
- `is_current`: boolean - is the current working directory (present when true)
- `is_previous`: boolean - is the previous worktree from `wt switch` (present when true)
diff --git a/src/cli.rs b/src/cli.rs
index b0113a04a..dfd91c12a 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -158,7 +158,7 @@ wt config shell init fish | source
Zsh (~/.zshrc):
```zsh
eval "$(wt config shell init zsh)"
-```console
+```
## Auto Setup
@@ -673,7 +673,7 @@ Note: `locked` and `prunable` are top-level fields on worktree objects, not in s
**Worktree position fields** (for identifying special worktrees):
-- `is_main`: boolean - is the main/default worktree
+- `is_main`: boolean - is the main worktree
- `is_current`: boolean - is the current working directory (present when true)
- `is_previous`: boolean - is the previous worktree from `wt switch` (present when true)
@@ -897,7 +897,7 @@ branch `foo` has a different worktree at `repo.bar/`, an error is raised.
- `@` - current worktree (by path, works in detached HEAD)
- `-` - previous worktree (from switch history)
-- `^` - main/default branch worktree
+- `^` - main worktree
### Branch deletion
diff --git a/src/commands/list/model.rs b/src/commands/list/model.rs
index ec5d5071e..6a156ae04 100644
--- a/src/commands/list/model.rs
+++ b/src/commands/list/model.rs
@@ -592,7 +592,7 @@ pub enum MainDivergence {
/// Up to date with main branch
#[default]
None,
- /// This is the main/default branch itself
+ /// This is the default branch itself
IsMain,
/// Ahead of main (has commits main doesn't have)
Ahead,
diff --git a/src/git/repository/mod.rs b/src/git/repository/mod.rs
index 0795286c9..41489b841 100644
--- a/src/git/repository/mod.rs
+++ b/src/git/repository/mod.rs
@@ -330,7 +330,7 @@ impl Repository {
/// * `name` - The worktree name to resolve:
/// - "@" for current HEAD
/// - "-" for previous branch (via worktrunk.history)
- /// - "^" for main/default branch
+ /// - "^" for default branch
/// - any other string is returned as-is
///
/// # Returns
@@ -377,7 +377,7 @@ impl Repository {
/// * `name` - The worktree name to resolve:
/// - "@" for current worktree (works even in detached HEAD)
/// - "-" for previous branch's worktree
- /// - "^" for main/default branch's worktree
+ /// - "^" for main worktree
/// - any other string is treated as a branch name
///
/// # Returns
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
index 7d21f145e..44ec0f55f 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
@@ -124,7 +124,7 @@ Note: locked and prunable are top-level fields on worktree objec
Worktree position fields (for identifying special worktrees):
-- is_main: boolean - is the main/default worktree
+- is_main: boolean - is the main worktree
- is_current: boolean - is the current working directory (present when true)
- is_previous: boolean - is the previous worktree from wt switch (present when true)
diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
index 0739ad496..872e2631c 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
@@ -82,7 +82,7 @@ branch foo has a different worktree at repo.bar/, an error is ra
- @ - current worktree (by path, works in detached HEAD)
- - - previous worktree (from switch history)
-- ^ - main/default branch worktree
+- ^ - main worktree
### Branch deletion