Interactive Checkout
Branch picker navigation, author filtering, worktree conflicts, and dirty checkout handling.
Running git-switchboard with no subcommand opens the
interactive branch picker. It lists local branches with author, date,
and linked PR info so you can quickly find and check out what you need.
Branch Picker
Each row shows one branch. The current branch is marked with
* and coloured green. Remote-only branches appear in
orange. The columns show the branch name, commit author, relative
date, an optional Linear issue identifier, and linked PR number.
Navigation
| Key | Action |
|---|---|
| j/k or Up/Down | Move between branches |
| Enter | Check out the selected branch |
| / | Search by branch name |
| a | Cycle author filter (All → Me → Team) |
| r | Toggle remote branches |
| p | Provider status |
| q or Esc | Quit |
Remote Branches
By default only local branches are shown. Press r to toggle
remote branches — the header updates to show Remote: ON.
When you check out a remote branch, git-switchboard creates a local
tracking branch automatically.
Author Filter
Press a to cycle the author filter. In Me
mode, only branches authored by the current Git user are shown. In
Team mode (when --author flags are
configured), only branches from the specified authors appear. The
active filter is shown in the header bar.
Checkout Flow
When you press Enter on a branch, git-switchboard checks for two potential conflicts before performing the checkout:
- Worktree conflict — the branch is already checked out in another git worktree.
- Dirty working tree — the current working tree has uncommitted changes.
If neither applies, the checkout happens immediately and git-switchboard exits.
Worktree Conflict
If the selected branch is already checked out in another worktree, a conflict screen appears with four options:
- Open editor — opens your editor in the existing worktree path, leaving branches as they are.
- Checkout new branch — creates a new branch from the selected one and checks it out in the current worktree. You'll be prompted to enter a branch name.
- Move worktree to new branch — moves the other worktree onto a new branch (freeing the target branch), then checks out the target in your current worktree.
- Move worktree to a different branch — switches the other worktree to an existing branch you specify, then checks out the target branch here.
Options that create or switch branches will prompt for a branch name via a text input. Validation checks that new branch names don't already exist and that existing branch names are valid.
Dirty Working Tree
If your working tree has uncommitted changes, git-switchboard shows the modified files and offers two choices:
- Stash changes and proceed — runs
git stashbefore checking out, so your changes are preserved and can be restored withgit stash pop. - Proceed anyway — checks out the branch without stashing. Git will refuse if the checkout would overwrite your changes; otherwise the modified files carry over to the new branch.
Press Backspace or Esc to go back to the branch picker without checking out.
Chained Conflicts
When a worktree conflict action also requires a checkout (e.g., moving a worktree to a different branch and then checking out the target), git-switchboard chains the dirty-checkout prompt after the worktree resolution. If the other worktree is dirty, you'll be asked about that first, then about your current worktree if needed.