Skip to content

Repository files navigation

var

var

A terminal UI for git archeology. Browse commits, trace file history, search for changes.

demo

Install

brew install arturopuente/tap/var

Or build from source:

go build -o var .

Usage

var            # open in current repo

var opens in commit list mode, showing files changed in each commit. Press Space to drill into a file's full history in single-file mode.

Features

  • Four display modes: diff, context (+10 lines), full file, and blame. Cycle with c.
  • Pickaxe search: press s to find commits that added or removed a specific string.
  • Reflog traversal: press r to navigate reflog entries instead of commit history.
  • Word-level highlighting: inline diffs show exactly what changed within each line.
  • Hunk jumping: n/N to jump between diff hunks.
  • File filtering: / to fuzzy-filter the file list.
  • File tree: press t to toggle a full-repo tree view alongside the diff.

Display modes and commit sources are orthogonal: any display works with any source.

Keys

Commit List Mode

Key Action
j/k Navigate files
[/] Older/newer commit
Space Enter single-file mode
/ Filter files
n/N Next/previous hunk
t Toggle file tree
Tab Switch focus
z Toggle commit description
q Quit

Single-File Mode

Key Action
c Cycle display: diff / ctx / full / blame
r Toggle reflog source
s Pickaxe search
[/] Older/newer in current source
d/u Half page down/up
n/N Next/previous hunk
z Toggle commit description
Esc Deactivate source / exit mode
1 Back to commit list

Development

Releasing

./release.sh patch   # v0.1.0 -> v0.1.1
./release.sh minor   # v0.1.0 -> v0.2.0
./release.sh major   # v0.1.0 -> v1.0.0

This tags the current commit and pushes to trigger the release workflow, which builds binaries and updates the Homebrew formula.

About

Git file archeology

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages