gitreview is a read-only terminal UI for reviewing the commits on your current branch relative to a base branch.
It is built for branch review inside the terminal:
- inspect commits ahead of
main,master, ororigin/HEAD - toggle into recent
HEADhistory for merged/older commit review - review a single commit diff
- select a contiguous commit range
- narrow a diff to a single file
- switch between a root repo and initialized submodules
- stay strictly read-only
This repository contains a working v1 core implementation in Go.
Supported now:
- root repo plus initialized submodule browsing in one session
- commit list and diff viewer
- file list and file-filtered diffs
- contiguous range selection
- commit filter mode with
/ - fullscreen diff and help overlay
- auto-detected base branch, with
--baseoverride - toggleable capped history mode for large repos
- Go 1.24.4+ to build from source
gitinstalled and available inPATH- terminal size of at least
80x24
Local build:
./rebuild.shThat produces:
./gitreviewPrint version:
./gitreview --versionSet the app version in one place:
- edit
DefaultVersionininternal/version/version.go ./rebuild.shand./release.shalways build from that value- release archive filenames are sanitized if needed, but the app version itself is embedded exactly as written
- the same version is used for
--versionoutput and the footer in the UI
Install to /usr/local/bin:
./rebuild.sh --installAfter installation:
gitreview
git gitreviewRun in the current repo:
gitreviewRun against an explicit repo path:
gitreview /path/to/repoOverride the detected base branch:
gitreview --base main
gitreview --base origin/main /path/to/repoHistory review mode:
- press
hto toggle between ahead-only review and recentHEADhistory - the header shows the active scope and either
ahead: Norloaded: N - history mode loads the most recent 300 commits first
- press
]to load 200 more history commits
If you launch gitreview at a superproject root and initialized submodules are present, the left side will show a REPOS section above COMMITS.
Use that section to switch between:
- the root repository
- initialized submodules
Workflow:
- launch
gitreviewfrom the root repo tabto theREPOSpanel- move with
j/k - press
enterorspaceto switch to that repo
Repos with ahead > 0 are highlighted in green so related branch work is easier to spot.
Global:
tab/shift+tab: switch panelsr: open the repo/submodule switcher overlayh: toggle ahead-only review vs recentHEADhistoryf: toggle fullscreen diff?: open helpq: quit
Repos panel:
j/kor arrows: moveg/G: jump to top / bottomenterorspace: switch repo or submodule
Commits panel:
j/kor arrows: movePgUp/PgDn: pageg/G: jump to top / bottomspace: start or update a contiguous commit selectionenter: focus diff/: filter commits by subject or short SHA]: load 200 more commits in history modeesc: clear selection or exit active filter mode
Files panel:
j/kor arrows: movePgUp/PgDn: pageg/G: jump to top / bottomenterorspace: filter the diff to the selected fileesc: clear the active file filter
Diff panel:
j/kor arrows: scrollPgUp/PgDn: page scrollg/G: jump to top / bottom
Test:
GOCACHE="$(pwd)/.cache/go-build" go test ./...Build:
GOCACHE="$(pwd)/.cache/go-build" go build ./cmd/gitreviewCreate local release archives:
./release.shThis writes archives to dist/.
release.sh is optional but useful in the public repo if you want a simple, repeatable local release process. If you plan to publish binaries from GitHub Actions later, keep it: the script is still useful for local testing and manual releases.

