See your repo's
branch state at a glance
A fast Go rewrite of git-wtf. Shows how branches relate to remotes and integration branches in a readable, color-coded summary.
What it shows you
Remote sync status
See at a glance whether your branch is ahead, behind, or in sync with its remote tracking branch.
Feature branches
Shows which feature branches are merged into the current branch and which still have outstanding commits.
Integration branches
Reports whether the current branch has been merged into integration branches like main or develop.
Color-coded output
Green for good, uncolored for action needed. Respects NO_COLOR and terminal detection.
Installation
go install github.com/abatkin/git-wth@latest
git clone https://github.com/abatkin/git-wth.git
cd git-wth
go build -o git-wth .
mv git-wth /usr/local/bin/git-wth
Once the binary is on your $PATH as git-wth, Git picks it up automatically as git wth.
Requires Go 1.21+ to build from source. No runtime dependencies.
Options
Run git wth [branch...] to inspect one or more branches. Defaults to the current branch.
| Flag | Long form | Description |
|---|---|---|
-l |
--long |
Include author info and date for each commit |
-a |
--all |
Show branches across all remotes, not just origin |
-A |
--all-commits |
Show all commits, not just the configured maximum |
-s |
--short |
Do not show individual commits |
-k |
--key |
Show the output key explaining bracket notation |
-r |
--relations |
Show relation to feature and integration branches |
-h |
--help |
Show usage and exit |
--version |
Print the version and exit | |
--dump-config |
Print the current configuration as YAML |
Short flags can be combined: -lk is equivalent to -l -k.
A bare -- ends option parsing; anything after is treated as a branch name.
Configuration
Bootstrap a config file with:
git wth --dump-config > .git-wthrc
The config file is YAML. git-wth searches for it walking up from the current directory, then in $XDG_CONFIG_HOME/git-wth/config, then ~/.git-wthrc.
integration-branches:
- heads/main
- heads/develop
ignore:
- heads/scratch
max_commits: 5
Local branches must be prefixed with heads/. Remote branches use remotes/<remote>/<branch>.
The tool also reads legacy .git-wtfrc files for drop-in compatibility with git-wtf.
Output key
| Symbol | Meaning |
|---|---|
[ ] | Branch exists locally and remotely |
( ) | Branch exists only locally |
{ } | Branch exists only on a remote |
[x] | Merged (locally and remotely) |
[~] | Merged locally only |
(space) | Not merged |