Branch Lens opens above the footer Git chip. Branches are on the left. A preview of the selected branch is on the right. Switching happens in the same panel, one git command at a time, and each command is echoed to the pane.

Click the chip to open it. Click it again, or press Esc, to close it. The chip appears when the tab folder is inside a Git repository.

Branch Lens with current, local, remote and merged branches on the left, and the checked-out branch’s pull request, commit log and working tree on the right
Branch Lens. Component harness with sample data; the app reads your repository. Windows and Linux show Ctrl where the picture shows ⌘.

The list

GroupWhat is in it
CurrentThe branch you are on
LocalYour other local branches. The base branch is first, with a base tag
Remote · originRemote branches with no local branch tracking them
Merged · safe to deleteLocal branches merged into the base, or whose upstream is gone after their pull request merged

The base branch is the remote’s default (origin/HEAD), or else main, master, trunk or develop. Each row shows how far the branch is behind the base (red, left) and ahead of it (green, right), its pull request and a CI dot, then the last commit and when it was made.

Pull requests come from your forge connections, the same list as @work: your pull requests and the ones waiting for your review. A branch with none shows No PR.

The tabs across the top are All, Local, Remote, Open PRs and Mine. Mine is a branch whose last commit has your git config user.email.

Type in the filter box to narrow the list:

TypeKeeps
wslbranches whose name, last commit or pull request title has the text
#branches with a pull request
#98the branch for pull request 98
@dependabotbranches whose last commit author has the text

⌘+R (Ctrl+R) runs git fetch --all --prune and reads the list again. The header shows when the last fetch ran.

The preview

The checked-out branch shows its upstream and how many commits are waiting to be pushed, the pull request card with its checks, and three views. Tab moves between them:

  • Commits: the commits that are not on the base. A commit that is not on the upstream yet shows Not pushed.
  • Files: the files that differ from the base, with lines added and removed.
  • Diff vs main: the diff, cut at 1,500 lines.

Working tree lists your uncommitted changes. Click a path to insert it at the prompt cursor. Nothing runs.

On the checked-out branch, the bar at the bottom has Stash (⌘+S), New branch from here (⌘+N), and Insert git push. Insert puts git push -u origin <branch> (or git push when it has an upstream) in the prompt. Termorq never pushes.

Switch

Select a branch and press Enter, or double-click it. A remote branch becomes a local branch that tracks it (git switch --track origin/<branch>). ⌘+Enter (Ctrl+Enter) opens the branch in a worktree in a new tab instead.

With nothing uncommitted, the switch runs at once. With uncommitted changes, Branch Lens asks first:

Uncommitted changes on fix/wsl-reattach-hang, with PtyPane.tsx marked as a conflict, and four choices: Stash and switch (recommended), Open in a worktree instead, Commit as WIP then switch, and Carry changes over (unavailable)
The choice when changes are in the way. Component harness with sample data.

KeyChoiceWhat runs
1Stash and switchgit stash push -m "termorq: <this branch>", then the switch. The stash comes back on its own when you switch back to this branch
2Open in a worktree insteadgit worktree add <folder>-<branch> <branch> and a new tab there. Nothing changes here
3Commit as WIP, then switchgit commit -a -m "chore(wip): save before switching". A local commit, never pushed. Undo it later with git reset --soft HEAD~1
4Carry changes overA plain git switch. Unavailable when the other branch changed one of your files

Untracked files stay where they are with every choice. Enter picks the recommended choice. Esc goes back to the list.

A stash only comes back when the working tree is clean after the switch. If it does not apply cleanly, it stays in git stash list, and Branch Lens says so.

Progress and after the switch

Each step shows its command and how long it took. When it is done, After the switch flags a changed lockfile, with a button that puts the install command in the prompt (pnpm install, npm install, yarn install, bun install, go mod download, poetry install, uv sync or bundle install). A changed Cargo.lock is flagged because the next build recompiles. A pull request with failing checks or changes requested is flagged with Open PR.

Switching to feat/fuzzy-history, with Stashed 2 files and Created local branch tracking origin done, and the last step running
Each step is a plain git command. Component harness with sample data.

Run in background closes the panel. The switch carries on and the chip updates when it lands.

Delete merged branches

Delete on the merged group, or ⌘+Backspace, asks first and then runs git branch -d for each one. -d keeps a branch git does not see as merged, which is common after a squash merge. Branch Lens lists those and does not force them. Run git branch -D <branch> yourself if you are sure.

⌘+⇧+H (Ctrl+Shift+H on Windows and Linux) opens a search box over the terminal. Press it again, or Esc, to close it.

The branch search box with wsl typed: fix/wsl-reattach-hang highlighted with its commits and draft pull request, two commits mentioning WSL, and an action to create fix/wsl
Branch search. Component harness with sample data.

  • Letters match in order, so fzh finds feat/fuzzy-history. Local branches come first.
  • The highlighted branch opens up to show its recent commits and pull request. → opens it in Branch Lens with the full log.
  • Commits mentioning lists commits whose message has the text, on any branch. Enter switches to the branch git found it on.
  • When nothing has that exact name, Create branch … from main and switch runs git switch -c <name> origin/main. ⌘+N does the same.
  • ⌘+1, ⌘+2 and ⌘+3 switch to your three most recent branches. With the box empty, - switches to the previous one, like git switch -.

With uncommitted changes, the highlighted branch says whether they can come with you:

feat/git-chip-branches highlighted, with Your 2 changed files can come with you and buttons for Carry over and switch, Stash then switch, and Worktree in new tab
Your changes can come with you. Component harness with sample data.

KeyDoes
EnterSwitch and carry your changes. When that would conflict, the four choices open
⌥+Enter (Alt+Enter)Stash, then switch
⌘+Enter (Ctrl+Enter)Worktree in a new tab
⌘+O (Ctrl+O)Open the pull request

Type # to list pull requests for this repository, sorted by what needs you: review requests and changes asked of you first, then approved ones with passing checks, then your drafts. #97 jumps to one.

Pull requests sorted into Needs you, Ready and Yours · draft
# lists pull requests by what needs you. Component harness with sample data.

WSL tabs

In a WSL tab, git runs inside that distribution through the tab’s shell session, the same way as pull request checkout. No host git command runs. The time of the last fetch is not shown there.

The prompt describes the chip. Forges connects the pull requests. Keyboard shortcuts lists Ctrl+Shift+H.