Skip to content
thiagokokadaPublic

About

A lightweight Git history explorer for Linux and macOS, written in Rust with GPUI

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

gitk-rs

Icon

A lightweight Git history explorer for Linux and macOS, written in Rust with GPUI.

Screenshot

Features

  • Commit history with a branch graph, author and date columns
  • Background loading and filtering to browse large repositories such as NixOS/nixpkgs
  • Syntax-highlighted diffs with support for more than 200 languages
  • Diff, old/new sides, adjustable context, whitespace filtering and word diffs
  • File list to jump between changes, with text selection and copying
  • File history from the changed-file list, with optional rename following
  • Staged, unstaged and untracked changes
  • Browse all branches, remote tracking branches and tags without checkout
  • Compare branch histories and diffs between endpoints or since their merge base
  • Branch switching, automatic refresh and keyboard navigation

Usage

Requires Git and either Linux with a Vulkan-capable graphics driver or macOS with Metal support.

# Browse the current repository
./gitk-rs

# Browse another repository
./gitk-rs ~/Projects/nixpkgs

Press F1 or ? to open Help, including keyboard shortcuts and search syntax.

Filter commits with words or metadata, for example author:alice path:ci.yml after:2026-01-01. Enable Regex beside the filter for regular expressions; leave it off for literal searches. See commit search for qualifiers, including contents: for added or removed text, and matching rules.

History streams in the background until the whole repository history is loaded. For lower memory use, --limit N opts into loading history on demand in batches of N commits. Set the worker count (1-8) in Preferences or with --git-workers N for history loading and content search; larger pools increase Git process memory.

For more command-line options:

./gitk-rs --help

Apply in Preferences saves gitk-rs/preferences.toml in the OS configuration directory (~/.config on Linux or ~/Library/Application Support on macOS). UI state configuration is remembered automatically in a separate gitk-rs/state.toml file.

Development

Building

Install a current stable Rust toolchain with rustup. On Ubuntu 26.04, install the native dependencies:

sudo apt-get update
sudo apt-get install -y build-essential pkg-config cmake clang libclang-dev git \
  libfontconfig1-dev libfreetype6-dev libssl-dev zlib1g-dev libwayland-dev \
  libxcb1-dev libxkbcommon-x11-dev libx11-dev libxcursor-dev libxi-dev \
  libxrandr-dev libvulkan-dev fonts-dejavu-core

On macOS, install the Xcode Command Line Tools and build tools with Homebrew:

xcode-select --install
brew install cmake pkg-config

Then build and run on either platform:

cargo build --release --locked
./target/release/gitk-rs /path/to/repository

Nix

Assuming that you have Flakes enabled:

nix build
./result/bin/gitk-rs /path/to/repository

Checks

With the dependencies above installed, or after entering nix develop:

cargo fmt --all -- --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --all-targets --locked

Run nix flake check for Rust, Nix, and Markdown formatting, Clippy, Ruff linting and formatting, and Python script tests. Run nix build to build the package and run its Rust tests.

For the optional GUI test in an isolated NixOS VM with IceWM, run nix build .#gui-smoke --print-build-logs on a Linux builder with KVM. See the smoke test instructions for requirements and artifacts.

License

MIT.

About

A lightweight Git history explorer for Linux and macOS, written in Rust with GPUI

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages