There're multiple solutions like this and I've used some of them over the past years.
- There's obviously the fantastic Magit (https://github.com/magit/magit) which is an Emacs Plugin but you can configure your Emacs start up just with Magic and nothing else so that Emacs is only used as a TUI Git client. I did this for a while.
- There's GitUI written in Rust (https://github.com/extrawurst/gitui) I did use this for a long time but recently switched over to LazyGit for the better Vim bindings and having more features
One thing that I added that (as far as I know) none of the others have and I sorely miss is VIM number based movements. So you can say 4j and jump 4 selections down. This makes it much faster (for me) to jump to the one file I'd like to commit. I ultimately stopped developing Gitsi because I didn't have the time to implement all the features others had readily available.
I do prefer TUI based Git clients to full blown GUI apps because of the keyboard movement. So I can quickly enter do something and exit, while staying in the terminal
Another in the same vein is vim-fugitive by tpope [1].
I have never used magit, only a Neovim plugin claiming to resemble it, but I would assume fugitive is much the same (and quite wonderful from my experience).
This tool might not be as advanced as lazygit, but I've been using tig daily for 6 or 7 years at this point and I find it perfect.
It's more like a viewer and you don't use it to switch branches or author commits, but to inspect the status of a repository, the diff of a commit, or a specific git tree, it works. It's lightweight, very portable, responsive and doesn't require to learn a lot of keyboard shortcuts.
6 comments
[ 2.7 ms ] story [ 26.8 ms ] thread- There's obviously the fantastic Magit (https://github.com/magit/magit) which is an Emacs Plugin but you can configure your Emacs start up just with Magic and nothing else so that Emacs is only used as a TUI Git client. I did this for a while.
- There's GitUI written in Rust (https://github.com/extrawurst/gitui) I did use this for a long time but recently switched over to LazyGit for the better Vim bindings and having more features
- LazyGit (https://github.com/jesseduffield/lazygit) is what I'm using right now and I'm mostly happy
I actually wrote my own in C some years ago called Gitsi (https://github.com/terhechte/gitsi).
One thing that I added that (as far as I know) none of the others have and I sorely miss is VIM number based movements. So you can say 4j and jump 4 selections down. This makes it much faster (for me) to jump to the one file I'd like to commit. I ultimately stopped developing Gitsi because I didn't have the time to implement all the features others had readily available.
I do prefer TUI based Git clients to full blown GUI apps because of the keyboard movement. So I can quickly enter do something and exit, while staying in the terminal
[1]: https://github.com/tpope/vim-fugitive
There are several git-related things I prefer to do in IntelliJ, like: fixing merge conflicts (I love the magic wand) and reviewing complex changes.
But otherwise I prefer the command line (mainly some of OhMyZsh's aliasses and `tig`). Probably just a force of habit.
https://news.ycombinator.com/item?id=25442510 (302 points | Dec 16, 2020 | 96 comments)
It's more like a viewer and you don't use it to switch branches or author commits, but to inspect the status of a repository, the diff of a commit, or a specific git tree, it works. It's lightweight, very portable, responsive and doesn't require to learn a lot of keyboard shortcuts.