Live data from Hacker News

Lazygit: A simple terminal UI for Git commands

github.com

111–120 of 143 posts

Re: Lazygit: A simple terminal UI for Git commands

#111
post #108

Earlier quoted context omitted.

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?

An editor extension that makes the editor behave like vim as far as editing operations are concerned (so modal, etc). E.g. Emacs has very accurate vim emulation in evil-mode.

Re: Lazygit: A simple terminal UI for Git commands

#112

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 trim?

Re: Lazygit: A simple terminal UI for Git commands

#113

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-flow has worked well in this regard for me.

Re: Lazygit: A simple terminal UI for Git commands

#114

Earlier quoted context omitted.

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.

It might be because of the UX around it if you're in the terminal? When it's easy to do you you're more likely to advantage of it.

Re: Lazygit: A simple terminal UI for Git commands

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

I do use that, and it's OK, but I just can't get used to the VS Code workflow or something...

Re: Lazygit: A simple terminal UI for Git commands

#116
post #25

Earlier quoted context omitted.

As far as I have seen (I prefer the cmdline myself) Git UIs usually have all sorts of features to select what changes should go into what commits down to single text lines. IMHO this sort of fine grained 'commit management' would be the only reason to use a git UI over what the command line offers.

`git add -p` does that as well, it's effectively what the GUIs are using. You can also [e]dit each thing and rewrite as desired, though it can be a bit fiddly. UIs can be nicer though for rewriting / making finer-grained splits than the hunks that -p decides on, definitely agreed there. I have broken out a UI just to simplify staging some gnarly commits. GUIs are also often nicer for understanding and resolving nasty…

>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?!

I repeatedly run into this using the interactive features.

Re: Lazygit: A simple terminal UI for Git commands

#119
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'…

One of the largest pieces of feedback I've had is around displaying the actual git commands that lazygit runs so now there's a new panel that does exactly that, displayed by default. I find that works well for demystifying what's going on and can actually help educate on which commands can satisfy which use cases. It's also kept me accountable in that if I try to satisfy some use case in a sneaky, smart way, it resul…

I always read these "make git easy" threads and I've also written my own "make git easy" wrapper around git. But this comment is the first that has ever given me confidence in actually trying one (by someone else). Nice job.

Re: Lazygit: A simple terminal UI for Git commands

#120

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…

consider:

[pull] rebase = true # if you're going to do it anyway might as well make it the default

[rebase] autoSquash = true # if you use --fixup commits autoStash = true # save yourself the roundtrip

Post reply on HN