Live data from Hacker News

The lazy Git UI you didn't know you need

bwplotka.dev

191–200 of 224 posts

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

#191

I just took lazygit for a spin: In general, the tool looks cool. It also looks like it takes time to learn; but if you find it useful, it's probably worth it taking the time to learn. There were two blockers for me: 1: I can't free-form select text with a mouse like a can in a terminal. (I honestly haven't used a TUI since the 1990s.) I frequently copy bits of branch names from the terminal, so this was a big deal fo…

If you run it in a tmux, you can do "set -g mouse on" in your config and then just select whatever you want.

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

#192

I just took lazygit for a spin: In general, the tool looks cool. It also looks like it takes time to learn; but if you find it useful, it's probably worth it taking the time to learn. There were two blockers for me: 1: I can't free-form select text with a mouse like a can in a terminal. (I honestly haven't used a TUI since the 1990s.) I frequently copy bits of branch names from the terminal, so this was a big deal fo…

If you run it in a tmux, you can do "set -g mouse on" in your config and then just select whatever you want.

TMux doesn't run on Windows. (Kinda implied, because I stated I use Visual Studio.)

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

#193
post #5

I was a big fan of a good keyboard-driven git TUI like magit, neogit, lazygit, etc... (as long as you learn the CLI first and understand it). Now I no longer directly use git, but instead use jujutsu (jj). Once I became very proficient in the jj cli, I picked up jjui: https://github.com/idursun/jjui Also, as splitting commits is an extremely frequent operation, this neovim plugin is really nice: https://github.com/ju…

I think a big problem with Git is that it's not opinionated enough. Every team has their own Git flow because Git makes it possible to do so and most developers love nothing more than micro optimizing every minute aspect of any work that is not the task they've been assigned this sprint (myself included), or avoiding learning anything at all (half of my coworkers) thereby leaving the decisions to people like me. I'd…

The problem with an optionated tool that mandated a specific workflow is that people that can't follow this workflow can't use the tool

This follows the Unix principle of "provide mechanisms, not policy" (as I remember from the esr book on Unix philosophy - ). Git provides mechanisms for version control and it's up to users, projects, organisations, etc to set up policy. That's because mechanisms are more universal, and policy changes with the whims of the stakeholders

(I actually agree that tools that mandate a workflow are more enjoyable. Not everyone needs to use the same version control and different DVCSes can or could be interoperable like git and jj are)

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

#194
post #16
post #5

I was a big fan of a good keyboard-driven git TUI like magit, neogit, lazygit, etc... (as long as you learn the CLI first and understand it). Now I no longer directly use git, but instead use jujutsu (jj). Once I became very proficient in the jj cli, I picked up jjui: https://github.com/idursun/jjui Also, as splitting commits is an extremely frequent operation, this neovim plugin is really nice: https://github.com/ju…

Jujutsu is much better than git, and I've switched to it completely, but I do still use lazygit for one thing: It has better diff viewing, it separates the diffs by file and they look nicer. It's the only thing keeping me on lazygit, as jjui is much better otherwise.

I've thought about using https://github.com/dlvhdr/diffnav for that

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

#195
post #8

Earlier quoted context omitted.

Thank you for the many tool links! You seems to know this space well. I have come to pick your brain for more. I have been searching for a while for good tools to split/regroup diffs in a patch series. hunk.nvim looks interesting. Do you know of similar/competing tools? I frequently hit a problem where removing a spurious hunk from an old commit causes cascading conflicts in all subsequent commits. Are there tools to…

I can't help with your actual problem but I am incredibly curious about how/why you run into this so frequently you need a tool for it. I feel like in my 15 or whatever years of using git I have basically never wanted to remove a hunk from an old commit or anything similar.

I am often responsible for landing branches created by colleagues who are less disciplined about their diff cleanliness than me. Very often, attempting to regroup a spurious change from an early commit to a separate "cleanup" commit results in a long conflict hell.

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

#196
post #5

I was a big fan of a good keyboard-driven git TUI like magit, neogit, lazygit, etc... (as long as you learn the CLI first and understand it). Now I no longer directly use git, but instead use jujutsu (jj). Once I became very proficient in the jj cli, I picked up jjui: https://github.com/idursun/jjui Also, as splitting commits is an extremely frequent operation, this neovim plugin is really nice: https://github.com/ju…

> I was a big fan of a good keyboard-driven git TUI like magit, neogit, lazygit, etc... (as long as you learn the CLI first and understand it).

How about tig?

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

#197

Earlier quoted context omitted.

I think a big problem with Git is that it's not opinionated enough. Every team has their own Git flow because Git makes it possible to do so and most developers love nothing more than micro optimizing every minute aspect of any work that is not the task they've been assigned this sprint (myself included), or avoiding learning anything at all (half of my coworkers) thereby leaving the decisions to people like me. I'd…

The problem with an optionated tool that mandated a specific workflow is that people that can't follow this workflow can't use the tool This follows the Unix principle of "provide mechanisms, not policy" (as I remember from the esr book on Unix philosophy - ). Git provides mechanisms for version control and it's up to users, projects, organisations, etc to set up policy. That's because mechanisms are more universal,…

Yeah, I think we could use a little more of "not trying to be everything for everyone". If more opinionated tools meant there were five or ten VCSes in common use rather than 1 or 2, I think that would be a better world.

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

#198
post #194
post #16

Earlier quoted context omitted.

Jujutsu is much better than git, and I've switched to it completely, but I do still use lazygit for one thing: It has better diff viewing, it separates the diffs by file and they look nicer. It's the only thing keeping me on lazygit, as jjui is much better otherwise.

I've thought about using https://github.com/dlvhdr/diffnav for that

This looks very interesting, thank you!

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

#199
post #65

Am I the only one who simply doesn't mind Git's CLI? Sure, it's rough around the edges, but I know those edges well. I sometimes do need to look up how to do something, but those cases are rare. Over the years I've accumulated about a dozen shell aliases and a modest `.gitconfig`, and along with a couple of helper tools[1][2], I can do 90% of what I need Git for in seconds. I truly don't need a fancy TUI, GUI, or any…

> Am I the only one who simply doesn't mind Git's CLI? No, but by definition, Git's CLI doesn't scale for complex use cases. No one would voluntarily use the CLI for doing a complex 3-way merge if they could avoid it. Due to the complexity of Git's interface, it's too easy to make a mistake using the CLI. I get we don't use most of the options most of the time, but when you need them, they're not exactly discoverable…

> No, but by definition, Git's CLI doesn't scale for complex use cases.

How so? A CLI is where you run commands and things happen. Sometimes those things can be "complex", whatever your definition of that may be.

> No one would voluntarily use the CLI for doing a complex 3-way merge if they could avoid it.

And nobody does...? A manual merge is done in an editor or a standalone tool, not the CLI.

> Due to the complexity of Git's interface, it's too easy to make a mistake using the CLI.

Well, Git's UI can be intimidating for a newcomer, but once they're acquainted with the dozen or so commands they might need every day, they can define aliases for them, and mistakes are no more likely than with any TUI or GUI wrapper. Git by design gives full control to the user, so mistakes can happen, but this is no different than with most Linux tools. And if safety is a concern, then whatever hand holding a TUI or GUI does, the same can be implemented in a shell script.

> git commit alone has 40+ options

So? You would prefer less options? Less commands? Less flexibility?

Just look up what you need to do and how to do it, and stick it in an alias. Now you have a clean command purpose built for your use case, and you can ignore anything you don't use.

Or, you can use a fancy TUI/GUI wrapper that "simplifies" this interface for you, and then when you need to do something that the wrapper UI doesn't allow you to do, have to fall back to the original UI. I'd rather familiarize myself with the original UI, create the aliases and helpers that work best for my workflow, and not have to depend on someone else's idea of how I should use Git, or any other tool.

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

#200

Earlier quoted context omitted.

The problem with an optionated tool that mandated a specific workflow is that people that can't follow this workflow can't use the tool This follows the Unix principle of "provide mechanisms, not policy" (as I remember from the esr book on Unix philosophy - ). Git provides mechanisms for version control and it's up to users, projects, organisations, etc to set up policy. That's because mechanisms are more universal,…

Yeah, I think we could use a little more of "not trying to be everything for everyone". If more opinionated tools meant there were five or ten VCSes in common use rather than 1 or 2, I think that would be a better world.

As long as they are interoperable, sure. Otherwise, network effects tend to the local optimum of a single VCS

Which is why jj is interesting, it managed to find a way to coexist within the Git monoculture rather than swim against the tide like Mercurial, Darcs, Pijul, Fossil

Post reply on HN