GRV - A Tool for Viewing Git Repositories in Linux Terminal

Channel: Open Source Linux
Abstract: branches and diffs of your repository using the syntax that follows. $ $GOBIN/grv -repoFilePath /path/to/repository/the following commands will instal

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 Diff 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.

Ref From: tecmint

Related articles