Print a little forest of local git branches
  • Rust 98.5%
  • Just 1.5%
Find a file
Ben Cox 58963914d8 Add ahead/behind column and improve column spacing
Show each branch's ahead/behind status relative to its upstream
(e.g. [+2/-5]) between the SHA and commit summary columns. Enforce
a minimum 20-character width for the branch name column and add
extra spacing between all columns for readability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 16:30:21 -04:00
.forgejo/workflows Add workflow for PRs 2026-03-16 20:38:20 -04:00
src Add ahead/behind column and improve column spacing 2026-04-05 16:30:21 -04:00
.gitignore Add tests and justfile 2026-03-16 20:27:52 -04:00
Cargo.lock Add ahead/behind column and improve column spacing 2026-04-05 16:30:21 -04:00
Cargo.toml Add ahead/behind column and improve column spacing 2026-04-05 16:30:21 -04:00
justfile Add tests and justfile 2026-03-16 20:27:52 -04:00
LICENSE Initial commit 2026-03-16 19:34:51 -04:00
README.md Initial commit 2026-03-16 19:34:51 -04:00

Glade

Print a little forest of local git branches

Glade prints a forest of trees of your local git branches, arranged so that each branch tracking another local branch appears as a child of that branch. Branches with no upstream (or a remote upstream) are shown as roots.

Installation

cargo install --path .

Or from the repository directly:

cargo install --git https://forge.djehuti.com/bcox/glade

Usage

Run glade inside any git repository:

$ glade
* main             a1b2c3d Initial commit
├── feature/baz    ec13850 Add baz feature
└── feature/foo    2fbd814 Add foo feature
    └── topic/bar  38a7f10 Fix bar in foo

The current branch is marked with * and shown in green. Branches checked out in other worktrees are marked with + and shown in cyan, with the worktree directory name displayed.

Options

Flag Description
--color Force colored output (even when piped)
--no-color Suppress colored output (even on a terminal)

By default, color is enabled when stdout is a terminal.

LLM Use

This project was initially bootstrapped by Claude Code (Opus 4.6).

License

This tool is released under a Creative Commons CC0 license.

See LICENSE.