Skip to content

Repository files navigation

gitree

A terminal-based git history visualization tool with live updates and time-based navigation.

Go

Why gitree?

Tools like tig and lazygit are excellent for performing git operations. gitree takes a different approach:

gitreetig / lazygit
FocusVisualizationActions
PhilosophyRead-only explorerFull git workflow
Time navigationDate histogram with range filteringScroll only
Live updatesAuto-refresh on file changesManual refresh
Graph densityDynamic width based on viewportFixed width

gitree is for understanding history, not managing it. When you need to explore a complex branch structure, find when a change was introduced, or visualize commit patterns over time — without accidentally modifying anything.

Use gitree alongside your existing workflow, not as a replacement.

Features

  • Visual commit graph - Multi-lane DAG visualization showing branch relationships
  • Live updates - Graph refreshes automatically when repository changes
  • Inline commit details - Expand commits to see files and diffs without leaving the graph
  • Tag visualization - Tags displayed as yellow badges on commits
  • Filtering - Filter by branch, author, or tag
  • Author highlight - Dim other commits to focus on one contributor
  • Search - Find commits by message or hash
  • Date histogram - Timeline showing commit density, filter by time range
  • Insights mode - Statistics dashboard with top authors, most-changed files, and activity heatmap
  • Diff view - View file changes with syntax highlighting
  • Vim-style navigation - Keyboard-driven with mouse support
  • Update checker - Check for new releases via --check-update

Layout

gitree repo-name
───────────────────────────────────────────────────────────────────
Message Author Date Hash
───────────────────────────────────────────────────────────────────
│ ○ [main] Add feature... Alice 12m ago 6144c
│ ╔═══════════════════════╤═══════════════════════════════════╗
│ ║ Commit: 6144c3d... │ Files (3) +42 -18 ║
│ ║ Author: Alice <a@...> │ > M src/app.go +30 -10 ║
│ ║ Date: Jan 30, 2026 │ A src/new.go +12 -0 ║
│ ╚═══ [j/k] file [Enter] diff [Esc] close ═════════════════╝
●─┘ Merge branch 'feature' Bob 1h ago a1b2c
│ Fix authentication bug Carol 2h ago b2c3d
───────────────────────────────────────────────────────────────────
⣀⣀⣤⣤⣶⣶⣿⣿⣶⣶⣤⣤⣀⣀
[━━━━━━━━━━]
───────────────────────────────────────────────────────────────────
● watching 47/1284 commits 12 branches [b]ranch [c]lear

Usage

# Open current directory
gitree
# Open specific repository
gitree /path/to/repo
gitree ~/projects/myrepo
# With initial filters
gitree -b main # Filter by branch
gitree -a "Alice"# Filter by author
gitree -t v1.0.0 # Filter by tag
gitree -b main -a "Alice"# Combine filters# Version and updates
gitree --version # Show version info
gitree --check-update # Check for new releases

Key Bindings

Navigation

KeyAction
j / k, / Navigate up/down
Ctrl+d / Ctrl+uPage down/up
g / GJump to top/bottom
EnterExpand commit (show files)
EscClose/collapse
qQuit

Filtering & Search

KeyAction
bBranch filter
aAuthor filter
AAuthor highlight (dims others)
tTag filter
/Search commits
n / NNext/previous match
cClear all filters
iToggle insights view
hShow help

Timeline

KeyAction
rToggle histogram
TabFocus histogram
h / lMove selection (when focused)
[ / ]Set range start/end
+ / -Zoom in/out
EnterApply time filter

When Expanded

KeyAction
j / kNavigate files
EnterOpen diff view
EscCollapse

Diff View

KeyAction
j / kScroll diff
h / lPrevious/next file
Esc / qClose

Installation

Download Binary

Download the latest release from the releases page.

# Example for macOS Apple Silicon
tar -xzf gitree_0.4.0_darwin_arm64.tar.gz
sudo mv gitree /usr/local/bin/

macOS users: If you see "cannot be opened because it is from an unidentified developer", run:

xattr -d com.apple.quarantine /usr/local/bin/gitree

Go Install

go install github.com/nogo/gitree/cmd/gitree@latest

Build from Source

git clone https://github.com/nogo/gitree.git
cd gitree
make build
# Binary is in bin/gitree

Requirements

  • Go 1.25 or later
  • A terminal with 256-color support

Dependencies

License

MIT

About

Terminal-based git history visualizer with live updates, time-based filtering, and vim-style navigation. Read-only explorer for understanding commit history.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages