switch
Check out any branch for testing without weaving it into the integration branch.
Usage
git loom switch [<branch>]
git loom sw [<branch>]
If no branch is given, an interactive picker lists all local branches and all remote-only branches.
Arguments
| Argument | Description |
|---|---|
<branch> | Branch to switch to: local branch name, remote-tracking name (e.g. origin/feature-x), or short ID of a woven branch. Optional — omit to pick interactively. |
What It Does
When Target is a Local Branch
HEAD moves to the named local branch (attached, not detached). No branch refs or commit history are changed.
When Target is a Remote-Only Branch
A remote-only branch is a remote-tracking ref (e.g. origin/colleague-work) with no local counterpart. HEAD is detached at that ref’s commit. No local tracking branch is created, so there is nothing to clean up afterward.
Interactive Picker (no argument)
Shows all local branches except the current one, followed by all remote-only branches. Selecting a local branch switches normally; selecting a remote-only branch detaches HEAD.
Target Resolution
- Local branch name — exact match against local branches
- Remote branch name — exact match against remote-tracking refs (e.g.
origin/feature-x) - Short ID — best-effort lookup via the woven-branch graph (requires being on an integration branch with upstream tracking configured; silently skipped otherwise)
Examples
Switch to a local branch
git loom switch feature-x
# ✓ Switched to `feature-x`
Switch using a short ID
git loom switch fx
# ✓ Switched to `feature-x`
Inspect a remote-only branch
git loom switch origin/colleague-work
# ✓ Detached HEAD at `origin/colleague-work`
# No local branch is created.
Return to the integration branch
git loom switch integration
# ✓ Switched to `integration`