OSSgit-switchboard

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

git-switchboard Remote: OFF | Author: All
Branch Author Updated PR
feat/add-pr-dashboard craigory 3d ago #42 Open
fix/auth-token-refre… craigory 2d ago #38 Open
* main craigory 1d ago -
chore/update-deps dependabot 4d ago #45 Draft
feat/branch-filters craigory 6d ago -
fix/unicode-rendering alex 5d ago #47 Open
[↑\↓] Navigate | [⏎] Select | [r]emote | [a]uthor | [p]roviders | [/] Search

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

KeyAction
j/k or Up/DownMove between branches
EnterCheck out the selected branch
/Search by branch name
aCycle author filter (All → Me → Team)
rToggle remote branches
pProvider status
q or EscQuit

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:

  1. Worktree conflict — the branch is already checked out in another git worktree.
  2. 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:

Branch 'feat/add-pr-dashboard' is checked out in another worktree
~/repos/worktrees/git-switchboard/pr-dashboard
› Open editor in ~/repos/worktrees/git-switchboard/pr-dashboard
Checkout new branch from 'feat/add-pr-dashboard' here
Move worktree to new branch from 'feat/add-pr-dashboard'
Move worktree to a different branch
[↑↓] Navigate | [⏎] Select | [⌫] Back
  • 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:

Working tree has uncommitted changes (3 files)
Checking out: main
src/app.tsx
src/types.ts
package.json
› Stash changes and proceed
Proceed anyway
[↑↓] Navigate | [⏎] Select | [⌫] Back
  • Stash changes and proceed — runs git stash before checking out, so your changes are preserved and can be restored with git 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.

All docs
StatusREAD