9

Gitui is a blazing fast terminal git interface

 3 years ago
source link: https://dev.to/waylonwalker/gitui-is-a-blazing-fast-terminal-git-interface-32nd
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Cover image for Gitui is a blazing fast terminal git interface

Gitui is a blazing fast terminal git interface

Jan 18 Originally published at waylonwalker.com

・2 min read

Gitui is a terminal-based git user interface (TUI) that will change the way that you work with git. I have been a long-time user of the git cli, and it's been hard to beat, mostly because there is nothing that keeps my fingers on the keyboard quite like it, except gitui which comes with some great ways to very
quickly walk through a git project.

installation

Go to their [releases]https://github.com/extrawurst/gitui/releases) page,
download the latest build, and pop it on your PATH. I have the following stuffed away in some install scripts to get the latest version.

install latest release

GITUI_VERSION=$(curl --silent https://github.com/extrawurst/gitui/releases/latest | tr -d '"' | sed 's/^.*tag\///g' | sed 's/>.*$//g' | sed 's/^v//')
wget https://github.com/extrawurst/gitui/releases/download/v${GITUI_VERSION}/gitui-linux-musl.tar.gz -O- -q | sudo tar -zxf - -C /usr/bin/
Enter fullscreen modeExit fullscreen mode

run gitui

It opens blazing fast.

gitui
Enter fullscreen modeExit fullscreen mode

Quick Commits

Sometimes I edit a number of files and want to commit them one at a time, this is painful in the git cli and my main use case for gitui. gitui shows unstaged changes at the top, staged changes on the bottom, and a diff on the right.

Navigate with hjkl

By default, gitui uses arrow keys, but simply copying vim_style_key_config.ron to your config directory will get you vim-like keybindings.

workflow

Generally, I pop open gitui, use j/k to get to the file I want to commit, glance at the diff to the right, press enter to stage the file, sc to switch focus to the saged files and commit, write my commit message hit enter and done.

  • w/s: to toggle focus between working and staged changes
  • j/k: to scroll each section
  • h/l: switch between left and right side
  • enter: toggle file from working or staging
  • c: start a commit message
  • p: push
  • : quit

Other Panes

I am in the Status [1] pane 90% of the time, but it also has three other panes for Log [2], Stashing [3], and Stashes [4]. I do not really use the stashes panes, but the Log [2] pane is quite useful to quickly go through the last set of commits and see the diff for each of them.

What UI do you use for git

Let me know what ui you use for git, do you stick to the cli, use a gui, or use a similar TUI interface?

Discussion

Subscribe

pic

CollapseExpand

I do most things from cli and only use ui's as a last resort, but I have been interested in looking into this for a little while, maybe it's time to check it out...

On another sort of off-topic note; I love wget and all, but I don't understand why lots of these GitHub projects don't have installers. I know most of us devs like to do things manually, but it's nothing anymore to build a quick installer for any files at GitHub, especially with JSDELIVR, which seems pretty dependable and if an installer is open source and does what it says then I prefer to use it. I built a nice reusable method in Rust recently to do so and so I've already built installers for a few other people's projects to use myself lol and one project that is released officially.

And on another sort of off-topic note: have you heard of axel as an alternative to wget? It's not necessarily a replacement as there are a couple of things it can't do that wget can, but for normal case uses axel is like a hot rod that goes from 0-60 in a few seconds and especially great for large files.

Comment button Reply


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK