Live data from Hacker News

The lazy Git UI you didn't know you need

bwplotka.dev

41–50 of 224 posts

Re: The lazy Git UI you didn't know you need

#41
post #27

Personally I just couldn't see all the extra layers as comfortable tools. It's a very rare thing that I need to see branches, relation between them etc. Using cli has always been the most reliable and simple way for me.The only git tool I need apart from cli is a convenient conflict resolver.

Yeah: Most use-cases for me split into:

1. Choosing what to commit and committing it, fixups, autosquash

2. Conflict resolution and history investigation

It's very rare I've wanted a separate tool for the first, and the second calls for a GUI tool.

Re: The lazy Git UI you didn't know you need

#42
Lazygit is the only way I review PRs these days because it is trivial to step through a file commit by commit when that is necessary (which maybe says something about the quality of the PRs I'm reviewing...). They also won me over by using Legend of the Galactic Heroes references in the github readme gifs.

Re: The lazy Git UI you didn't know you need

#43
post #6

The less I use git directly, the more convinced I am that git is an absolutely awful interface to git repositories. I have been using jj for about two years now, and I literally cannot imagine going back to using the git cli. I have not used lazygit, but if you find it interesting, I say please go for it. The please is because I am tired of fixing issues created by people being confused by git. Just use anything else…

I have tried jj several times but I feel like it slows me down significantly because I can’t grok the workflow. I like to do a bunch of changes then quickly select them in my editor and commit them, breaking them up into different commits to keep them organized. With jj’s lack of editor integration, I don’t know how to do this with the cli alone so I end up with bigger messier commits.

Re: The lazy Git UI you didn't know you need

#44
Maybe I missed it but I couldn't find where to install it from and autocomplete doesn't resolve to a debian package either...

https://github.com/jesseduffield/lazygit?tab=readme-ov-file#...

So with a newer non-LTS ubuntu you can just apt install lazygit, with 24.04 it's

``` LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/..." | \grep -Po '"tag_name": "v\K[^"]') curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v..." tar xf lazygit.tar.gz lazygit sudo install lazygit -D -t /usr/local/bin/ ```

Re: The lazy Git UI you didn't know you need

#45
Something not mentioned in the article which has changed the way I interact with git repos (and the reason I will never not use LazyVim until something better comes along) is just how well the system plays with tmux floating panes.

I have it so that anytime I press ctrl-g in a git repo, I open a floating tmux pane in my current working directory. This might sound "whatever", but it means I don't have to actually be inside neovim or "switch" to the LazyGit UI. It just overlays it on top of whatever I'm doing at the moment in the terminal.

Makes for the most fluid, streamlined git experience ever if you primarily live in the terminal.

Re: The lazy Git UI you didn't know you need

#46
post #7

You might laugh, but in years of serious development, I have not come across a better git UI tool than SourceTree. If I want to be hard-core, I'd use the original git CLI. SourceTree is unmatched in how it makes using git so much more pleasant for when you need to do something relatively simple, but which would be quite cumbersome to do with the CLI and most other tools I've tried. Its file status and history view is…

It's pretty good but also really slow. I never found one better than GitX, but that was in the days before IDEs had Git support built in. Now they do it doesn't really make sense to use a separate program IMO.

These days I use VSCode and the Git Graph extension.

Re: The lazy Git UI you didn't know you need

#47
post #6

The less I use git directly, the more convinced I am that git is an absolutely awful interface to git repositories. I have been using jj for about two years now, and I literally cannot imagine going back to using the git cli. I have not used lazygit, but if you find it interesting, I say please go for it. The please is because I am tired of fixing issues created by people being confused by git. Just use anything else…

I have tried jj several times but I feel like it slows me down significantly because I can’t grok the workflow. I like to do a bunch of changes then quickly select them in my editor and commit them, breaking them up into different commits to keep them organized. With jj’s lack of editor integration, I don’t know how to do this with the cli alone so I end up with bigger messier commits.

You want "jj commit -i". You'll get an interface that lets you choose files, chunks, or lines to commit.

Re: The lazy Git UI you didn't know you need

#48
post #35

Earlier quoted context omitted.

Do you use the Mac or Windows version?

The Mac version

The Windows version is decent too. They seem to be at least partly different code bases, which is nice in some respects, but does mean they're not quite the same. The Mac version is less good about doing git submodule update when required, and sometimes the side panel state can be wrong; the Windows version seems to occasionally forget the state of the delete after applying option when doing git stash pop.

Despite having some annoying aspects, it is (as if you even needed to ask) still better than using the command line, and, importantly, has yet to annoy me enough to actually switch to something else. Though as an Emacs fan I do have Magit on my list.

Re: The lazy Git UI you didn't know you need

#49
"git gui" is not just a wrapper for commands; it has usefully different workflows.

For instance, you can visually select a range of lines in a file, and stage those lines.

This is much easier than doing "git add --patch" and using edit, where you are deleting unwanted lines starting with +, turning - lines into context and whatnot.

I have found it useful to fire up "git gui" during rebase workflows with conflicts. It helps with the "git add" commands you would have to do to add conflict-resolved files into the patch and whatnot.

Post reply on HN