Branches and targets
Every Git-backed task worktree has a current branch. The app also records where that branch started and which branch it should be compared with or merged into.
Branch vocabulary
Section titled “Branch vocabulary”| Term | Meaning | Where it matters |
|---|---|---|
| Current branch | The branch checked out in this worktree | Commits, pushes, and pull-request source |
| Base branch | The branch or revision used to create the worktree | Initial files and history |
| Default branch | The project’s preferred base for new worktrees | The normal + and ⌘N flow |
| Target branch | The branch this worktree is reviewed and merged against | Diffs, changed-file counts, behind state, PR/MR target, and review prompts |
| Upstream | The remote-tracking branch associated with the current branch | Fetch, ahead/behind state, pull, and push |
These values often point to main and origin/main, but they solve different problems. Do not infer one from another.
Automatic naming
Section titled “Automatic naming”Click + or press ⌘N to create a task worktree from the project’s default branch.
With Settings → Worktrees → Automatic worktree naming enabled—the default—the app creates the worktree immediately with a temporary sc- name. The first meaningful task prompt is used once to generate a durable branch and worktree name. Setup chatter and empty messages do not consume that naming opportunity.
The built-in rule uses kebab-case and a Conventional Commits-style prefix:
feat/api-docsfix/login-timeoutrefactor/sidebar-statedocs/install-guidechore/update-fixturestest/settings-round-tripci/release-workflowperf/file-indexstyle/format-docsbuild/update-toolchainEdit branch naming rules under Settings → Agents. Rules cascade global → workspace → project, so a repository can require a ticket or other local convention without changing every workspace.
For example:
Use {ticket}/{short-description} in kebab-case, such as ENG-1234/login-timeout.Manual naming and recovery
Section titled “Manual naming and recovery”Disable automatic naming when you want to enter the name before the worktree is created. The normal + flow then opens a naming form.
You can also rename an existing temporary branch from an app-launched worktree terminal:
sc worktree rename-branch feat/api-docsRun this command from the intended worktree. It is useful for CLI-created worktrees, naming failures, or deliberate manual recovery; it is no longer a required first step in the default UI flow.
If the bundled sc helper is not ready when automatic naming starts, the app shows the problem and opens the manual naming form. Finish the rename before using normal review and shipping actions.
Start from a specific branch or review
Section titled “Start from a specific branch or review”Press ⌘⇧N or choose New worktree from… to open the creation picker. It has up to three sources:
- Prompt creates a task from a prompt, provider, and base branch.
- Branches lists local and remote branches.
- PRs/MRs lists forge reviews when authenticated
ghorglabsupport is available.
A branch already checked out in another worktree is marked In workspace. Git normally permits a local branch to be checked out in only one worktree at a time.
Starting from a PR or MR restores its source and target context. Starting from another branch does not permanently change the project’s default branch.
Default branch and target branch
Section titled “Default branch and target branch”Set both values in project settings:
- Default branch supplies the normal starting point for future worktrees.
- Default target branch supplies the initial review and merge target for future worktrees.
Changing a project default does not silently rewrite the branch or target of existing worktrees. Each task keeps its own target so a release branch, stacked change, or backport can remain accurate.
Read the current worktree state from an app-launched terminal:
sc worktree status --jsonChange only this worktree’s target when you intend to change its comparison and merge destination:
sc worktree set-target-branch release/2026-05The target powers changed-file summaries, review diffs, behind indicators, action prompts, and pull-request creation. Folder names, origin/HEAD, and the current branch name are not authoritative substitutes.
Pull-request target context
Section titled “Pull-request target context”When a worktree has an associated pull request or merge request, the app also reads the forge’s base branch and review state. If the local target and forge target differ, correct the mismatch before relying on the diff or merging.
The active worktree refreshes forge context directly. Inactive worktrees use cached and batch-refreshed context until you return, which limits background forge traffic.
Fetch and synchronization
Section titled “Fetch and synchronization”Fetching updates remote-tracking references. Optional settings under Settings → Worktrees → Syncing can then fast-forward:
- Clean worktree branches after fetch.
- The clean default branch after fetch.
Fast-forwarding applies only when Git can update safely without rewriting local work. Dirty or diverged worktrees still require an explicit merge, rebase, or other Git decision.
Before shipping, confirm:
- The current branch has a durable name.
- The target is the branch you intend to merge into.
- The upstream points to the expected remote branch.
- The branch is not unexpectedly behind or diverged.
Compact sidebar hover cards and Detailed sidebar rows show the same branch and Git state. Enable sidebar commit status in Settings → Appearance if you want local commit and push state visible before PR status takes over.