Live data from Hacker News

Lazygit: A simple terminal UI for Git commands

github.com

101–110 of 143 posts

Re: Lazygit: A simple terminal UI for Git commands

#101
post #23

Earlier quoted context omitted.

Literally every git GUI I've used has screwed up a git repository at some point, requiring relatively-advanced CLI use to untangle it. They're wildly untrustworthy IMO. They also almost never perform reasonably on truly large repos, aside from gitk. Since using a GUI has inevitably required me to learn CLI in depth, and adds the complexity of figuring out what the hell the GUI actually did because of course it doesn'…

I use Fork for picking apart which lines I want to commit. It's very cumbersome to commit only specific files and lines using the terminal. I use the terminal for everything else. I would never trust a GUI to do a rebase, not even sure if it's possible with Fork because I've never tried.

It definitely is, and the UX is quite lovely :)

Re: Lazygit: A simple terminal UI for Git commands

#102
post #72

Earlier quoted context omitted.

May I ask what made you choose lazygit instead of fugitive? I'm using the latter and am quite happy with it, but I'm keen to learn what I'm missing out on.

Personally I’m not a fan of the fugitive/magit style UI, ie learn a bunch of esoteric commands (:Git blah) so that you don’t need to remember the other set of original commands. With lazygit/tig, at least there is a visual pager with shortcut letter I need to press along with a text hint about what it actually does.

Magit is fairly straight forward if you have helm. magit-commt, magit-push, magit-pull, magit-status, etc. But so long as you have helm, it is really easy. A lot of the time I don't even need to type 'magit-', I can just type 'status' and helm will pull 'magit-status' to the top of the list.

Re: Lazygit: A simple terminal UI for Git commands

#103
post #65

Earlier quoted context omitted.

I use magit in emacs and I can create any commit I want by slicing out a bunch of characters in a diff. The git CLI is workable for a lot of things,but the experience of higlighting an arbitrary block of text and saying "commit THIS" has not been matched in any other git UI. We're not talking about hunks or lines here, but literally committing an abitrary range of characters.

> committing an abitrary range of characters Honest question: what is the practical use case for this? I'm a fan of small, atomic commits but I don't recall ever wanting to commit just a range of characters.

It could be useful for changes in CSV files or text files with table-like formatting where you want to commit the change in just one specific column of a row, but not the other. I could also see it for binary files which aren't structured into lines.

Re: Lazygit: A simple terminal UI for Git commands

#104
post #15

Magit is another popular alternative for emacs https://magit.vc I wonder if anyone has gone from lazygit to magit or the other way around. As someone who uses emacs for my day to day dev work I can't see myself changing.

The edamagit extension for VS Code is also fairly good: https://marketplace.visualstudio.com/items?itemName=kahole.m...

Re: Lazygit: A simple terminal UI for Git commands

#105

Can lazygit help me clean up my branches? Our GitHub is set to delete a branch whenever we squash merge it in a PR. But for the life of me I cannot get my local version to cleanup too. All the stack overflow popular answers that use sed and such fail for some reason.

git remote prune origin ?

Re: Lazygit: A simple terminal UI for Git commands

#106
post #87

If there is one thing that terrifies me it's using Git, or any source control, from the command line. No matter how long I've been in this industry, I just can't get cozy with doing a lot of heavy lifting in any shell environment. Give me the GUI all day every day.

I know this is going to sound elitist, but it always bothers me to see comments like this that make it seem like it's okay to not learn how computers work even though you're a software developer (which I'm assuming you are). The command line isn't some mystical scary thing, it's a extremely effective method of controlling a computer. It's survived this long for a reason, and it's not going to go anywhere. It's powerf…

> extremely simple

For some things, definitely not for doing a 3 way merge.

Re: Lazygit: A simple terminal UI for Git commands

#107
post #6

Another great terminal UI for git is tig: https://jonas.github.io/tig/

Tig is great for visualising and stepping through history but for quickly performing other Git related task I found it was missing something. That something turned out to be exactly Lazygit.

i've been using [gitui](https://github.com/extrawurst/gitui) for that. lazygit does seem like it has more features though

Re: Lazygit: A simple terminal UI for Git commands

#108
post #79

Earlier quoted context omitted.

I use both, though I only use fugitive for "git blame" and I use Lazygit for log browsing and partial staging. With me, it's just what tool will stick, fugitive might be great but I just don't stick with it. Same with editors, I really want to like VS Code but in the end I just open vim by default again.

You can try vim emulation inside vscode, there is an extension for that. https://marketplace.visualstudio.com/items?itemName=vscodevi...

What is a vim emulator?

Re: Lazygit: A simple terminal UI for Git commands

#109
post #79

Earlier quoted context omitted.

I use both, though I only use fugitive for "git blame" and I use Lazygit for log browsing and partial staging. With me, it's just what tool will stick, fugitive might be great but I just don't stick with it. Same with editors, I really want to like VS Code but in the end I just open vim by default again.

You can try vim emulation inside vscode, there is an extension for that. https://marketplace.visualstudio.com/items?itemName=vscodevi...

It does not support all vims features.

Re: Lazygit: A simple terminal UI for Git commands

#110
post #84

This looks great, looking forward to trying it out. I am kind of getting X Tree Gold vibes, great to see that the UI colours are customisable, I might have a crack at giving this an X Tree Gold theme / look.

If you use windows, I recommend jumping on ZTree Win. https://www.ztw3.com/ It's a port of xtree gold that works on modern windows. I've been using it daily for probably a decade.

Ah I'm a macOS user, but good to note nonetheless!
Post reply on HN