Skip to content

Branches

The Branches tab is a singleton tab providing full lifecycle management for local and remote git branches.

Branch Sections

Branches are organized into collapsible sections:

  1. Current Branch — always visible at the top, highlighted with a “current” badge
  2. Favorites — branches you’ve starred for quick access
  3. Local Branches — all other local branches, with a search/filter bar
  4. Remote Branches — grouped by remote, each with a Prune button to remove stale tracking refs

Branch Display

Each branch row shows the branch name, ahead/behind badges, and compact action buttons. Click the chevron to expand a branch and see:

  • Commit hash (clickable — opens the Commit tab)
  • Full commit message and author
  • Commit date
  • Upstream tracking status
  • Worktree indicator (if the branch is checked out in a worktree)
  • Push remote and merge mode

The expanded view also shows full-width action buttons: Switch, Merge, Rebase, Compare, Branch, Rename, Copy, and Delete.

Branch Operations

Create Branch

Create a new branch from the current branch or from any existing branch via the expanded action buttons.

Switch Branch

Switch to a branch with automatic dirty-state handling — if you have uncommitted changes, Glint offers to auto-stash them first.

Merge

Merge a branch into the current branch. The dialog lets you choose the fast-forward mode:

ModeBehavior
AutoFast-forward if possible, otherwise merge commit
FF-onlyOnly fast-forward; fail if not possible
No-FFAlways create a merge commit
SquashSquash all commits into one

Rebase

Rebase the current branch onto a selected branch, replaying commits with interactive conflict resolution.

Compare

Open a Compare tab showing the diff between any branch and the current branch.

Rename

Rename a branch with validation.

Delete

Delete a branch with a confirmation dialog that accounts for merged status, worktree association, and dirty state.

Remote Branch Operations

Right-click or use action buttons on remote branches for:

  • Fetch — download the latest from the remote
  • Checkout as Local — create a local tracking branch
  • Delete Remote Tracking — remove the tracking reference (not the remote branch itself)
  • Prune — remove stale tracking refs for a remote

Upstream Tracking

Set or unset upstream tracking from the expanded branch view. Inline badges warn when the upstream branch name differs from the local branch.

Favorites

Toggle the star icon on any branch to add it to the Favorites section. Favorites are stored per-repository and persist across sessions.

Cleanup Merged Branches

Use the cleanup action to list all branches already merged into the current branch, then bulk-delete them with optional remote tracking ref removal.

Conflict State

During merge or rebase conflicts, all branch operations are disabled with tooltips explaining why. Resolve conflicts in the Changes tab first.

Context Menu

Right-click a branch for the full list of operations, including worktree management, copy branch name, and copy commit hash.