dotlinux blog

GRV – A Tool for Viewing Git Repositories in Linux Terminal

Git is the backbone of modern software development, enabling version control, collaboration, and code management for millions of developers worldwide. While the Git command-line interface (CLI) is powerful, it can feel cumbersome for tasks like visualizing complex commit histories, managing branches, or browsing stashes. Commands like git log --graph --oneline --all work, but they lack interactivity and can become cluttered in large repositories.

Enter GRV (Git Repository Viewer), a lightweight, terminal-based interactive tool designed to simplify Git repository navigation. Built in Go, GRV provides an intuitive, keyboard-centric interface that lets you explore commits, branches, stashes, and tags without ever leaving your terminal. Whether you’re a seasoned Git user looking to streamline your workflow or a developer new to version control, GRV bridges the gap between raw CLI commands and full-fledged GUI Git clients like GitKraken or Sourcetree.

In this detailed guide, we’ll cover everything you need to know to install, use, and customize GRV on Linux, from basic navigation to advanced customization.


2026-05

Table of Contents#

  1. Key Features of GRV
  2. Prerequisites for Installing GRV
  3. Installing GRV on Linux
  4. Getting Started with GRV
  5. Core Functionalities in Depth
  6. Customizing GRV
  7. Tips and Tricks for Efficient Use
  8. Pros and Cons of GRV
  9. Conclusion
  10. References

1. Key Features of GRV#

GRV stands out among terminal-based Git tools thanks to its robust feature set and user-friendly design. Here are its most notable capabilities:

  • Interactive Terminal UI: No GUI dependencies—runs entirely in your terminal with a clean, organized layout.
  • Full Git Object Support: Explore commits, local/remote branches, stashes, tags, and even reflogs.
  • Inline Diff Viewing: View commit diffs directly in the terminal without switching to another tool.
  • Powerful Search and Filter: Search for commits by author, message, date, or SHA, and filter results to narrow down your focus.
  • Keyboard-Centric Navigation: All operations are accessible via keyboard shortcuts, making it fast for power users.
  • Extensive Customization: Tweak key bindings, themes, and interface layouts via a human-readable config file.
  • Lightweight Performance: Runs smoothly on low-resource systems, with minimal memory and CPU usage.
  • Cross-Platform Compatibility: Works on Linux, macOS, and Windows (though this guide focuses on Linux).

2. Prerequisites for Installing GRV#

Before installing GRV, ensure your Linux system meets these requirements:

  • Git: Installed and configured (required to interact with repositories). Verify with git --version.
  • Linux Distro: Any modern distro (Ubuntu, Fedora, Arch, etc.).
  • Build Essentials (Optional): For compiling from source (requires build-essential on Debian/Ubuntu, development-tools on Fedora).
  • Go Language (Optional): Needed if you plan to build GRV from source (version 1.11 or later recommended).

To install Git on Debian/Ubuntu:

sudo apt update && sudo apt install git

On Fedora/RHEL:

sudo dnf install git

3. Installing GRV on Linux#

GRV can be installed via package managers (for most distros) or compiled from source. Below are step-by-step instructions for common Linux distributions:

3.1 Ubuntu/Debian-based Distros#

Download the official .deb package from the GRV releases page and install it:

# Replace X.X.X with the latest version number
wget https://github.com/rgburke/grv/releases/download/vX.X.X/grv_X.X.X_amd64.deb
sudo dpkg -i grv_X.X.X_amd64.deb
# Fix any missing dependencies
sudo apt install -f

3.2 Fedora/RHEL-based Distros#

Download the .rpm package and install using DNF:

wget https://github.com/rgburke/grv/releases/download/vX.X.X/grv-X.X.X-1.x86_64.rpm
sudo dnf install grv-X.X.X-1.x86_64.rpm

3.3 Arch Linux#

GRV is available in the Arch User Repository (AUR). Install it using an AUR helper like yay:

yay -S grv

3.4 Compile from Source#

If no pre-built package exists for your distro, compile GRV from source:

# Install Go (Debian/Ubuntu example)
sudo apt install golang-go build-essential
 
# Set Go environment variables (add to ~/.bashrc for persistence)
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
 
# Clone the GRV repository
git clone https://github.com/rgburke/grv.git
cd grv
 
# Build and install GRV
make install

Verify installation with grv --version.


4. Getting Started with GRV#

Once installed, using GRV is straightforward. Here’s how to launch and navigate the interface:

4.1 Launch GRV#

Navigate to any Git repository and run:

grv

You can also launch GRV from outside a repository by specifying the repo path:

grv --repo /path/to/your/git/repo

4.2 Interface Overview#

GRV’s interface is divided into three main panels:

  • Top Bar: Displays the repository path, current branch, and commit stats (ahead/behind remote).
  • Main Panel: Shows the active view (commits, branches, stashes, etc.). For commits, it includes a visual graph of branch history.
  • Detail Panel: Shows detailed information about the selected object (e.g., full commit message, author details, or diff).

4.3 Basic Navigation#

GRV uses keyboard shortcuts for navigation. Here are the most essential ones:

ShortcutAction
Arrow KeysMove up/down through list items
EnterSelect an item and expand its details
qQuit GRV
bSwitch to Branch View
sSwitch to Stash View
tSwitch to Tag View
/Open search bar to search for commits/branches
nJump to next search match
pJump to previous search match
dShow diff for the selected commit
Ctrl+RRefresh the view (sync with Git repo changes)

5. Core Functionalities in Depth#

Let’s dive into GRV’s most powerful features and how to use them effectively.

5.1 Commit History Exploration#

The default view in GRV is the commit list, which includes:

  • A visual graph of branch merges and splits.
  • Commit SHA, author name, date, and truncated message.

To explore commits:

  1. Use arrow keys to navigate to a commit.
  2. Press d to view the diff between the commit and its parent.
  3. Press Enter to expand the full commit message and author details.
  4. Use Ctrl+Left/Right to switch between parent commits of a merge.

5.2 Branch Management#

Switch to Branch View with b to manage local and remote branches:

  • Local Branches: Highlighted in green.
  • Remote Branches: Displayed with the remote name (e.g., origin/main).

Key actions in Branch View:

  • Press o to checkout the selected branch.
  • Press D to delete a local branch (confirm with y).
  • Press r to fetch updates from the remote.

5.3 Stash View#

Access your stashes with s:

  • Each stash entry shows the stash message, date, and author.
  • Press a to apply the selected stash.
  • Press d to drop the selected stash (permanently delete it).
  • Press p to pop the stash (apply and delete it).

5.4 Tag View#

Switch to Tag View with t to browse repository tags:

  • Select a tag to jump to its associated commit.
  • Press d to view the diff between the tagged commit and its parent.

5.5 Search and Filter#

GRV’s search functionality lets you quickly find specific objects:

  1. Press / to open the search bar.
  2. Type your query (e.g., fix bug to find commits with "fix bug" in the message).
  3. Use n/p to navigate through matches.

For advanced filtering, use the command bar (press : to open it):

  • Filter by author: :filter author:"John Doe"
  • Filter by date range: :filter date:"2023-01-01..2023-12-31"
  • Filter by branch: :filter branch:"main"

5.6 Diff Viewing#

GRV lets you view diffs directly in the terminal:

  • For commits: Press d to see the diff between the selected commit and its parent.
  • For stashes: Press d to see the changes stored in the stash.
  • Use Arrow Keys to navigate through the diff, and q to exit the diff view.

6. Customizing GRV#

GRV is highly customizable via its configuration file. The default config is located at /etc/grv/config, but you should create a user-specific config at ~/.grv/config to avoid overwriting system-wide settings.

6.1 Creating a User Config#

Copy the default config to your home directory:

mkdir -p ~/.grv
cp /etc/grv/config ~/.grv/config

6.2 Customizing Key Bindings#

Edit ~/.grv/config to modify key bindings. For example, to change the "checkout branch" shortcut from o to c:

[bindings branchList]
checkout = c

6.3 Theme Customization#

GRV supports theme customization via style sections. For example, change the commit message color to yellow:

[style commitList.message]
color = yellow
 
# Change branch name color to blue in Branch View
[style branchList.branchName]
color = blue

You can use standard terminal colors: black, red, green, yellow, blue, magenta, cyan, white, or their bright variants (e.g., brightred).

6.4 Modifying Interface Layout#

Adjust the default view or panel sizes in the config. For example, set the default view to Branch View:

[view branchList]
default = true

7. Tips and Tricks for Efficient Use#

Here are some pro tips to maximize your productivity with GRV:

  1. Launch GRV from Anywhere: Use grv --repo /path/to/repo to open a repository without navigating to it.
  2. Sort Commits: Press : to open the command bar and type :sort date desc to sort commits by newest first, or :sort author asc to sort by author name.
  3. Export Commit Info: Use :export /path/to/file.txt to export the current list of commits to a text file.
  4. Debug Issues: Launch GRV with grv --log-level debug to generate detailed logs for troubleshooting.
  5. Quick Reflog Access: Press r to switch to Reflog View, which shows all recent HEAD changes (useful for recovering lost commits).

8. Pros and Cons of GRV#

Before adopting GRV, consider these advantages and limitations:

Pros#

  • Lightweight: No GUI dependencies, making it ideal for remote servers or low-resource systems.
  • Intuitive Interface: Balances power with ease of use, even for intermediate Git users.
  • Comprehensive Features: Covers almost all daily Git tasks without leaving the terminal.
  • Highly Customizable: Tailor every aspect of the tool to your workflow.

Cons#

  • Steep Learning Curve: Advanced features like complex filtering require time to master.
  • No Merge Conflict Resolution: You’ll still need to use git merge or a separate tool to resolve conflicts.
  • Limited Community Support: Compared to more popular tools like Tig, GRV has fewer tutorials and third-party resources.
  • No Built-in Git Operations: Some advanced tasks (e.g., cherry-picking commits) still require using the Git CLI.

9. Conclusion#

GRV is a powerful, terminal-centric tool that simplifies Git repository navigation for developers who prefer working in the terminal. Its interactive interface, comprehensive feature set, and customization options make it a worthy alternative to both raw Git CLI commands and heavyweight GUI clients.

Whether you’re visualizing complex branch histories, managing stashes, or searching for specific commits, GRV streamlines your workflow without sacrificing power. If you’re a Linux developer looking to enhance your Git experience, give GRV a try—it might become your new favorite terminal tool.


10. References#