Live data from Hacker News

Lazygit: Simple terminal UI for Git commands

github.com

21–30 of 82 posts

Re: Lazygit: Simple terminal UI for Git commands

#21
post #19

I found lazygit after building something of my own thay solves some of these problems for me - git-fuzzy [0]. I'd like to share some of my thoughts about the comparison. lazygit is a TUI for git which can behave in a standalone fashion. It's also designed to be quick and easy to use to perform quite advanced actions but ones that a seasoned git user may really want when working with git history. Since I'm already a s…

Of tools that mash interactive GUIs (lazygit) with scriptable shells (git fuzzy), I only know of AutoCAD. Scripts would routinely ask you to interactively select a set of points or an item in a list. Are there other apps that offer scriptable GUIs ?

I vaguely remember doing similar things with Matlab, but it has been a while and I don't recollect fully.

Re: Lazygit: Simple terminal UI for Git commands

#22

Earlier quoted context omitted.

Is this something missing specifically from IDEA? In Rider, there are features that allow committing individual lines instead of a whole file. You can select in the commit dialog which lines to include/omit. Also I recommended taking a look at Changelists feature that allows separating certain changes from what would be committed next (I believe it works line by line basis).

I don't know Rider, but I assume this is a limitation in all of their IDEs. Yes, you can commit only certain changes within a file. But you can only do that based on whole chunks. For example, if you add two new lines at the end of an existing file, you cannot commit only one line but not the other. The same limitation applies to changelists (at least in IntelliJ IDEA and Webstorm).

Doesn't this come from git itself? If you try `git add -p `, it'll chunk just as "bad".

Re: Lazygit: Simple terminal UI for Git commands

#23

Earlier quoted context omitted.

Is this something missing specifically from IDEA? In Rider, there are features that allow committing individual lines instead of a whole file. You can select in the commit dialog which lines to include/omit. Also I recommended taking a look at Changelists feature that allows separating certain changes from what would be committed next (I believe it works line by line basis).

I don't know Rider, but I assume this is a limitation in all of their IDEs. Yes, you can commit only certain changes within a file. But you can only do that based on whole chunks. For example, if you add two new lines at the end of an existing file, you cannot commit only one line but not the other. The same limitation applies to changelists (at least in IntelliJ IDEA and Webstorm).

Indeed. That is a limitation with Rider too.

Re: Lazygit: Simple terminal UI for Git commands

#24
post #19

I found lazygit after building something of my own thay solves some of these problems for me - git-fuzzy [0]. I'd like to share some of my thoughts about the comparison. lazygit is a TUI for git which can behave in a standalone fashion. It's also designed to be quick and easy to use to perform quite advanced actions but ones that a seasoned git user may really want when working with git history. Since I'm already a s…

Of tools that mash interactive GUIs (lazygit) with scriptable shells (git fuzzy), I only know of AutoCAD. Scripts would routinely ask you to interactively select a set of points or an item in a list. Are there other apps that offer scriptable GUIs ?

> Are there other apps that offer scriptable GUIs

Isn't this the essence of "plugins" in most GUI apps?

Re: Lazygit: Simple terminal UI for Git commands

#25
post #19

I found lazygit after building something of my own thay solves some of these problems for me - git-fuzzy [0]. I'd like to share some of my thoughts about the comparison. lazygit is a TUI for git which can behave in a standalone fashion. It's also designed to be quick and easy to use to perform quite advanced actions but ones that a seasoned git user may really want when working with git history. Since I'm already a s…

Of tools that mash interactive GUIs (lazygit) with scriptable shells (git fuzzy), I only know of AutoCAD. Scripts would routinely ask you to interactively select a set of points or an item in a list. Are there other apps that offer scriptable GUIs ?

Emacs (which, incidentally, uses a lisp for scripting, like autocad).

Re: Lazygit: Simple terminal UI for Git commands

#26

Earlier quoted context omitted.

I don't know Rider, but I assume this is a limitation in all of their IDEs. Yes, you can commit only certain changes within a file. But you can only do that based on whole chunks. For example, if you add two new lines at the end of an existing file, you cannot commit only one line but not the other. The same limitation applies to changelists (at least in IntelliJ IDEA and Webstorm).

Doesn't this come from git itself? If you try `git add -p `, it'll chunk just as "bad".

You can edit the hunk manually. I believe it's also possible to construct a hunk to apply entirely from scratch as long as you get the header right.

Re: Lazygit: Simple terminal UI for Git commands

#27

Earlier quoted context omitted.

I don't know Rider, but I assume this is a limitation in all of their IDEs. Yes, you can commit only certain changes within a file. But you can only do that based on whole chunks. For example, if you add two new lines at the end of an existing file, you cannot commit only one line but not the other. The same limitation applies to changelists (at least in IntelliJ IDEA and Webstorm).

Doesn't this come from git itself? If you try `git add -p `, it'll chunk just as "bad".

Yes, git generally stages just hunks with the patch add mechanism, but it is possible to stage single lines, but it is a bit tedious, see: https://kennyballou.com/blog/2015/10/art-manually-edit-hunks...

Re: Lazygit: Simple terminal UI for Git commands

#29

I use this a lot, as well as Magit. Simple terminal commands work fine, but I like selecting what chunks of code I want to commit, and these tools make it especially easy.

My only gripe with Magit (I'm not sure how Lazygit does with this) is how hard it is to search a large commit log. l l will pull up a truncated list of commits that you can search in, but if the commit you want isn't in that list, you have to keep requesting a handful more commits at a time to search in. I find it can be faster to just use git log and search in my pager instead.

Otherwise Magit is a fantastic piece of software :D

Post reply on HN