GRV – A Tool for Viewing Git Repositories in Linux Terminal

GRV (Git Repository Viewer) is a free open-source and simple terminal-based interface for viewing git repositories. It provides a way to view and search refs, commits, branches and diffs using Vi/Vim like key bindings. It’s behavior and style can be easily customized through a configuration file.

GRV Features:

  • Provides a query language to filter refs and commits.
  • Supports Vi/Vim-like key-bindings by default, and key bindings can be customized.
  • Captures changes to the repository by monitoring the filesystem allowing the UI to be updated automatically.
  • It is organized as tabs and splits; allows for creating custom tabs and splits using any combination of views.
  • Supports customizable themes.
  • Offers mouse support.

Requirements:

  1. Go version 1.5 or later should be installed on your system.
  2. libncursesw, libreadline and libcurl.
  3. cmake (to build libgit2).

How to Install GRV in Linux Systems

First install required dependencies using the default package manager as shown.

$ sudo apt install libncurses5-dev libncursesw5-dev libreadline-dev cmake	#Debian/Ubuntu 
# yum install ncurses-devel readline-devel cmake 		                #RHEL/CentOS
# dnf install ncurses-devel readline-devel cmake		                #Fedora 

Then install GRV, the following commands will install GRV to $GOPATH/bin. A static libgit2 will be built and included in GRV when built this way.

$ go get -d github.com/rgburke/grv/cmd/grv 
$ cd $GOPATH/src/github.com/rgburke/grv
$ make install

After successfully installing GRV, you can view refs, commits, branches and diffs of your repository using the syntax that follows.

$ $GOBIN/grv -repoFilePath /path/to/repository/

In this example, we will view refs, commits, branches and diffs of repository file in ~/bin/shellscripts.

$ $GOBIN/grv -repoFilePath ~/bin/shellscripts 
View Git Refs
View Git Refs
View Git Diff
View Git Diff
View Git Commits
View Git Commits

You can find additional usage options from the GRV help page.

$ $GOBIN/grv -h

GRV Github repository: https://github.com/rgburke/grv

In this article, we have explained how to install and use GRV, a terminal based UI for viewing git repositories. Use the feedback form below to share your thoughts about it or ask any questions.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.