Live data from Hacker News

GitUI: Terminal UI for Git

github.com

61–70 of 94 posts

Re: GitUI: Terminal UI for Git

#61

I'm by no means an expert, but is it really that hard to remember clone, pull, commit -a, push and maybe something else you'd need. That you need a GUI? And even then you can either use the help or man or just Google it and you'll remember the right command sooner than later. 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…

I use a git GUI (Sourcetree) as a time saving tool to visualize the git repo, browse through commits to view changes, diff non adjacent commits or branches, etc. I have never used it to actually alter the state of my repo, all that is much easier on the command line for me. But TUI is woefully inadequate for getting the hang of even a moderately complex repo that I'm trying to understand.

Re: GitUI: Terminal UI for Git

#63
post #58

I'm by no means an expert, but is it really that hard to remember clone, pull, commit -a, push and maybe something else you'd need. That you need a GUI? And even then you can either use the help or man or just Google it and you'll remember the right command sooner than later. 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…

People who use commit -a terrify me. The value of a tool like this is it makes it trivial to review changes, stashes, etc. in a convenient way without needing to look up commands. This tool in particular is built to handle huge repos which most other front ends straight up can't. And it does it with a 1mb binary and almost no ram.

Definitely agreed. My workflow for a commit is always:

    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.

Re: GitUI: Terminal UI for Git

#64
post #60

Earlier quoted context omitted.

I have used vim-fugitive for years to read large and small codebases. Its blame and re-blame interface is the best I've found.

Have you used magit? If there's a better one out there than magit's, I want to know.

I haven't, but I don't use emacs. Crash course:

`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/

Re: GitUI: Terminal UI for Git

#65
post #49

Earlier quoted context omitted.

tig rules. 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.

rust binaries are statically linked, that's the big difference. If you included all the libc code statically in most c programs they'd probably also be pretty big

Go programs are also statically linked and Go based CLI tools generally only come in at 3-4 MB IIRC. I've used static linking in binaries in Nim and C programs too with similar (or smaller) sizes.

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

Re: GitUI: Terminal UI for Git

#66

I'm by no means an expert, but is it really that hard to remember clone, pull, commit -a, push and maybe something else you'd need. That you need a GUI? And even then you can either use the help or man or just Google it and you'll remember the right command sooner than later. 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…

I use an alias like this:

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

Re: GitUI: Terminal UI for Git

#68
post #21

Lazygit is an alternative which worked great so far for me https://github.com/jesseduffield/lazygit

Gitui's README mentions that Lazygit freezes and sometimes crashes parsing large repos, taking the example of the linux repo, and reports that Gitui is more than twice as fast: https://github.com/extrawurst/gitui#3--benchmarks-top- 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. Gi…

I use tig and with 200k commits, walking the log goes a bit wild so the trick is too just default to loading a maximum number of commits etc.

There's a sample config in the repo on how to manage large repos

Re: GitUI: Terminal UI for Git

#69
post #49

Earlier quoted context omitted.

tig rules. 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.

rust binaries are statically linked, that's the big difference. If you included all the libc code statically in most c programs they'd probably also be pretty big

when i have an embedded board with say 64mb storage,a few rust executable will fill them up fast. problem is that rust does not give me option to do dynamic link to its stdlib.

Re: GitUI: Terminal UI for Git

#70

I'm by no means an expert, but is it really that hard to remember clone, pull, commit -a, push and maybe something else you'd need. That you need a GUI? And even then you can either use the help or man or just Google it and you'll remember the right command sooner than later. 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…

no but it (at least tig) facilitates navigating the graph, partially staging etc.
Post reply on HN