The basic Git commands are good enough for the usual clone, add, commit push.
But if you are working on a large project with multiple contributors, you may need to visualize things. A GUI tool gives a better view on the diff, stash and blame.
But then, if you are a terminal dweller, who wants the comfort of GUI with Git, I have got a good tool for you.
It is called GitUI and it provides user experience and comfort similar to a git GUI but right in your terminal. It is portable, fast, free and open source.
GitUI: A terminal based tool for Git
GitUI is not the first Git client for Linux terminal. So, what makes GitUI different than other similar projects like lazygit or tig?
GitUI developer has shared some benchmark in the README file of the project.
Time | Memory (GB) | Binary (MB) | Freezes | Crashes | |
gitui | 24 s | 0.17 | 1.4 | No | No |
lazygit | 57 s | 2.6 | 16 | Yes | Sometimes |
tig | 4 m 20 s | 1.3 | 0.6 | Sometimes | No |
Most of this optimization comes from the use of Rust programming language.
Note: This program is in early stages of development and is not production ready yet.
Installing GitUI on Linux
Needless to say, you should have Git installed on your system already.
To use GitUI, you need to install Rust support for your Linux distribution first.
In a terminal, use the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Go with option 1 when you are asked for a choice. When script finishes installation, set the configuration right with this command:
source $HOME/.cargo/env
Now that you have Rust and its package manager Cargo installed, use the Cargo command to install GitUI:
cargo install gitui
And youβre ready to use GitUI, for that just type gitui
in the terminal to run it. I made some sample files to play with Git and GitUI.
Itβs important to mention that the interface has a fast and intuitive keyboard-only control. Everything is as easy as type the correct letter to stage, commit, branch, or push your files into your git repository.
Something that really gets me excited was that you can not only do the four actions before, but you can also edit each file, pull it, blame it, navigate inside it, and more things; everything without existing from the interface. Awesome, isnβt it?
Felicitations! Now you know how to install GitUI and how it looks like in your terminal.
If you like the project, start its repository on GitHub. If you use some other tool to manage Git, please suggest your favorite in the comment section.