GitUI: Terminal UI for Git
github.com
github.com
gitui does not support vim keybinding for me, or I did not find out how.
rust's size always surprise me:
tig -- 600KB, gitui: 11MB
similar size pattern for other utilties, in general, rust executable is about 200x larger than its c/c++ peers, and, they all linked to similar c/c++ libraries, looks like rust stdlib is pretty big in size to me.
Having said that, I'm also a tig user and at least at first glance, I prefer its simplicity. Gitui presents a huge amount of info on the default screen and spends quite a lot of real estate drawing borders around everything. Tig just takes me straight to the commit history, full screen and then I have single key actions to get to other views.
The only thing I don't like with Tig is how little it binds to keys with the expectation that you set up your own mappings to git commands. I would prefer it baked more of them in so they would be standard and documented ... but that is a minor complaint.
Rust binaries are just impressively large. I'd guess part of it must be how Rust monomorphizes generics: https://rustc-dev-guide.rust-lang.org/backend/monomorph.html
It actually is possible to dynamically link to the standard library. Add this to your project's .cargo/config.toml file:
[build]
rustflags = ["-C", "prefer-dynamic"]
And add a reference to this crate, which copies the stdlib's shared library to your output directory:https://github.com/WilliamVenner/prefer-dynamic
After you do `cargo build --release`, you will notice you hello world EXE is much smaller than a typical rust binary. Like 10~20KB small. On Windows it runs just fine. On Linux, I has to change the exe's RPATH to look for the standard library in the current directory:
patchelf --set-rpath '$ORIGIN' ./exe_name
Anyways, it is possible. The rustc compiler itself is shipped in this way.tried all size reduction tricks,still the size is much large,like 15x large than c,c++. even the stdlib is a 3x larger than to libstdc++
It's the only tool I use to compliment the git cli.
I just prefer switching to my git tab in tmux and using the cli or tig deepening on what I'm doing.
At least for the stability issues, does this match your experience?
I see others have mentioned tig here as well, I'd be curious to hear if they also find it somewhat slow and unstable. Gitui's linux benchmark lists it as being almost 11 times faster than tig.
There's a sample config in the repo on how to manage large repos
The design works very very well for me.
It's great that all these options are becoming available and bringing ideas into the mix.
Anyway, I'm a happy user of this for VS Code
https://marketplace.visualstudio.com/items?itemName=kahole.m...
Just wanted to mention this in case anyone was under the impression that Magit was TUI only!
Or am I missing some quite important? I've been using this for most of the stuff that I do in github and it seemed to be enough.
I use these on my Chromebook, but on my stationary computer I just use the integration in VS Code.
git status
git diff HEAD
git add (usually -u)
git commit
I catch so many mistakes checking the diff before committing. Just seeing the code in a different context helps things pop up.> gac Update controller
which means “git add all and commit with this message” very rarely do I make a mistake with this. Maybe once every 3 weeks, in which case I just restore the file I accidentally added.
Speaking as to "why would you not just use command line git, or VSCode integration".
Two aspects: Speed, and discoverability.
These are two things that magit massively improves upon the command line.
e.g. to make the commit, in magit, it's the key sequence "<Spc> g g" (to open magit) then "c c" to commit. (Being able to quickly do this from the same place you edit code is very convenient).
In terms of discoverability, magit shows me the common options for commands (e.g. it shows `-a autostash` for git pull), or other commands which might be useful that I've not used (like git worktree).
I feel like you are. The operations you mentioned - clone, pull, “commit -a”, and push - are trivial. Nobody needs a nice UI for those.
But in real day-to-day use, I’m branching, merging, creating and applying stashes, cherry picking, rebasing, browsing the repo history, browsing specific file histories, diffing across branches, selectively committing specific changes in a file, etc. and it’s convenient to have a nice UI for the more advanced use cases.
If there's a better one out there than magit's, I want to know.
`mkdir -p ~/.vim/pack/git/start`
`git clone https://github.com/tpope/vim-fugitive ~/.vim/pack/git/start/vim-fugitive`
Open a file under version control and `:Git blame`
The commit shas, author, and date appear in a window to the left. `Ctrl+w Ctrl+w` to switch windows. Both windows scroll up and down together.
Pressing `o` on a commit sha opens the full commit log and patch in a window below. Close this with `:q`
Pressing `~` on a commit sha re-blames on parent (git's ~)
Pressing `P` on a commit sha re-blames on parent (git's ^)
There's also a set of (old and a bit outdated) Vimcasts on fugitive, episodes 31-35 http://vimcasts.org/episodes/archive/
I mostly use gitui for staging things, it supports file, hunk and line staging, it's meant to compliment git cli, not replace it.
I also use it to manage tags.
So far just a "browse" experience somewhat like GitHub, but uglier.
Soon want to add ability to commit, similar to GitHub desktop, but without electron.
Very WIP atm but hoping to work on it some this week.