Live data from Hacker News

Lazygit: A simple terminal UI for Git commands

github.com

91–100 of 143 posts

Re: Lazygit: A simple terminal UI for Git commands

#91
> Rant time: You've heard it before, git is powerful, but what good is that power when everything is so damn hard to do? Interactive rebasing requires you to edit a goddamn TODO file in your editor? Are you kidding me? To stage part of a file you need to use a command line program to step through each hunk and if a hunk can't be split down any further but contains code you don't want to stage, you have to edit an arcane patch file by hand? Are you KIDDING me?! Sometimes you get asked to stash your changes when switching branches only to realise that after you switch and unstash that there weren't even any conflicts and it would have been fine to just checkout the branch directly? YOU HAVE GOT TO BE KIDDING ME!

> If you're a mere mortal like me and you're tired of hearing how powerful git is when in your daily life it's a powerful pain in your ass, lazygit might be for you.

I sympathise, deeply. If you've never found yourself counting lines - repeatedly, because your last attempt failed - while manually editing a hunk, then I envy you.

Re: Lazygit: A simple terminal UI for Git commands

#92

I maintain a bunch of git aliases in my .gitconfig for my company's rebase based workflow. They cover 90% of my 'dumb' git usages synced = pull origin master --rebase. # Update myself with master squash = rebase -i origin/master # Let me optionally squash whatever has happened since master publish = push origin HEAD --force-with-lease # Save to orig in (github) pub = push origin HEAD --force-with-lease # Save to orig…

I used to use aliases but got frustrated with them when dealing with PRs depending on PRs, so I wrote git-stack [0]. Thought I'd share in case you'd find it useful

[0] https://github.com/epage/git-stack/blob/main/docs/reference....

Re: Lazygit: A simple terminal UI for Git commands

#93
post #54

Am I missing something with Ubuntu? Is it really deprecated? What’s the best way to install and keep up to date on Ubuntu?

I think that it's just difficult to submit updates to Ubuntu or get them incorporated. I think you can just download the binary and put it in /usr/bin or clone and run go install as per the instructions.

That's bad practice though. Devs should be comfortable having older (security patched) versions of software in repos, which provide a valuable service for users.

It's hostile for devs to push PPAs only, as it implies that their ability to push updates faster is more important than the distro's review process.

Re: Lazygit: A simple terminal UI for Git commands

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

Re: Lazygit: A simple terminal UI for Git commands

#96
post #54

Earlier quoted context omitted.

I think that it's just difficult to submit updates to Ubuntu or get them incorporated. I think you can just download the binary and put it in /usr/bin or clone and run go install as per the instructions.

That's bad practice though. Devs should be comfortable having older (security patched) versions of software in repos, which provide a valuable service for users. It's hostile for devs to push PPAs only, as it implies that their ability to push updates faster is more important than the distro's review process.

Linus Torvalds about this: https://www.youtube.com/watch?v=Pzl1B7nB9Kc

Distros (Debian in particular comes to mind) have some really annoying packaging rules, and as a maintainer of a Go program, it's a huge pain, so we decided to just set up a repo with https://cloudsmith.com/ instead of trying to deal with that. They require every dependency (indirect or not) to be packaged separately. We don't have the time for that. Way simpler to just build a static binary and ship it.

Re: Lazygit: A simple terminal UI for Git commands

#97
post #79
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.

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

Re: Lazygit: A simple terminal UI for Git commands

#98
post #65
post #16

Earlier quoted context omitted.

Exactly the opposite for me. I absolutely do not trust GUIs to do the right thing. I don't trust text area to use correct line endings consistently across platforms, I don't trust them to be up to date with new options for `commit` or `checkout`, they never show examples what result will be (--dry-run). None GUI is ever up to date with documentation and contains all functionality which I can autocomplete with [tab][t…

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.

Re: Lazygit: A simple terminal UI for Git commands

#99
post #16

Earlier quoted context omitted.

Exactly the opposite for me. I absolutely do not trust GUIs to do the right thing. I don't trust text area to use correct line endings consistently across platforms, I don't trust them to be up to date with new options for `commit` or `checkout`, they never show examples what result will be (--dry-run). None GUI is ever up to date with documentation and contains all functionality which I can autocomplete with [tab][t…

The entire point of a GUI is you get the behavior of -p and --dry-run in a much richer context! I've never seen a GUI that doesn't let you very easily select specific lines for commits and I honestly wouldn't use one that didn't. I cannot imagine using git and only being able to push entire files... - And for the record, I use Sublime Merge and it does a great job mapping to terminal commands. Hover over any button a…

I cannot imagine using git and having a reason to commit only half a file. I've known it was possible for several years. But never once has it been a solution to any problem I've had. I suppose we both have limited imaginations.

Re: Lazygit: A simple terminal UI for Git commands

#100
post #29

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.

Honestly... I'm the exact opposite. It's impossible to craft a complex GUI intuitively I think.

Apparently it was also impossible to craft a complex CLI intuitively.
Post reply on HN