I use IntelliJ IDEA and often rely on their own Git functionality. But it cannot stage specific lines, only whole chunks [1]. For that, I've been using lazygit for a couple of months now. I like its simple UI and that it makes staging specific lines very easy and quick. If you like lazygit, you might also be interested in similar Git CLI clients that I collected here [2]. [1] https://youtrack.jetbrains.com/issue/IDEA…
FWIW, the per line staging functionality in GitUp ( https://gitup.co/ ) is quite easy and straightforward. Very lightweight program that you can open via cli (`gitup` when in a git directory)
Lazygit: Simple terminal UI for Git commands
41–50 of 82 posts
Re: Lazygit: Simple terminal UI for Git commands
#42I use IntelliJ IDEA and often rely on their own Git functionality. But it cannot stage specific lines, only whole chunks [1]. For that, I've been using lazygit for a couple of months now. I like its simple UI and that it makes staging specific lines very easy and quick. If you like lazygit, you might also be interested in similar Git CLI clients that I collected here [2]. [1] https://youtrack.jetbrains.com/issue/IDEA…
Re: Lazygit: Simple terminal UI for Git commands
#43I use IntelliJ IDEA and often rely on their own Git functionality. But it cannot stage specific lines, only whole chunks [1]. For that, I've been using lazygit for a couple of months now. I like its simple UI and that it makes staging specific lines very easy and quick. If you like lazygit, you might also be interested in similar Git CLI clients that I collected here [2]. [1] https://youtrack.jetbrains.com/issue/IDEA…
[1] https://blog.jetbrains.com/idea/2023/06/intellij-idea-2023-2...
Re: Lazygit: Simple terminal UI for Git commands
#44I 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…
I have 5 un-pushed commits. I missed a 1-line change to that first one. I add that one line change to staging (gitui/lazygit/whatever), then I want to `git commit --fixup=COMMIT`. Finding that COMMIT is always a manual process for me for two reasons.
First I have to find the commit to which it applies. This commit is almost always the commit that changed the same line, or added lines around it, or something similar. I guess you could say it's the commit with the closest proximity to the change I'm adding.
Second I have to find the hash of that commit. If I've since done something like an autosquash rebase then it'll have changed. I generally end up using the mouse to do a copy/paste at this point.
Why not skip the fixup commits and just rebase right then, you might ask. Well the commits are signed, and signing requires tapping my yubikey for each commit after that.
I would really like to be able to do something like `git commit --I'm-an-idiot-and-missed-this-so-please-apply-a-fixup-to-the-proper-commit`, and have it do the figuring out for me.
Re: Lazygit: Simple terminal UI for Git commands
#45I'm curious how much people prefer TUIs over editor-plugin-GUIs these days. I'm getting more and more persuaded by the plugin model personally - perhaps partly by how easy it is to discover, install, update, uninstall, etc VSCode plugins
Re: Lazygit: Simple terminal UI for Git commands
#46I 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…
Interesting project... in the hopes of maybe nerd-sniping you (or having someone tell me where it already exists), I'll tell you the story I'd really like a solution to but can never seem to find time to build: I have 5 un-pushed commits. I missed a 1-line change to that first one. I add that one line change to staging (gitui/lazygit/whatever), then I want to `git commit --fixup=COMMIT`. Finding that COMMIT is always…
Re: Lazygit: Simple terminal UI for Git commands
#47I 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…
Interesting project... in the hopes of maybe nerd-sniping you (or having someone tell me where it already exists), I'll tell you the story I'd really like a solution to but can never seem to find time to build: I have 5 un-pushed commits. I missed a 1-line change to that first one. I add that one line change to staging (gitui/lazygit/whatever), then I want to `git commit --fixup=COMMIT`. Finding that COMMIT is always…
Re: Lazygit: Simple terminal UI for Git commands
#48I'm curious how much people prefer TUIs over editor-plugin-GUIs these days. I'm getting more and more persuaded by the plugin model personally - perhaps partly by how easy it is to discover, install, update, uninstall, etc VSCode plugins
I'm glad people still build these TUIs, that's exactly what i need, simple interaction with my keyboard, no fuss, no bloat (edit: just checked, the executable is pretty large ~5mb, I wish Go made some effort in that area), a simple executable that can run on my headless server through SSH
Re: Lazygit: Simple terminal UI for Git commands
#49Earlier quoted context omitted.
Interesting project... in the hopes of maybe nerd-sniping you (or having someone tell me where it already exists), I'll tell you the story I'd really like a solution to but can never seem to find time to build: I have 5 un-pushed commits. I missed a 1-line change to that first one. I add that one line change to staging (gitui/lazygit/whatever), then I want to `git commit --fixup=COMMIT`. Finding that COMMIT is always…
I usually solve this by commiting my fixup in a dummy commit, then do a rebase -i HEAD~n where n is the number of commits I want to look back at. Then during the rebase I just move my commit below the one that seem the most appropriate and mark it for squash. Execute the rebase. Done
Thanks for the tip!
Re: Lazygit: Simple terminal UI for Git commands
#50I'm curious how much people prefer TUIs over editor-plugin-GUIs these days. I'm getting more and more persuaded by the plugin model personally - perhaps partly by how easy it is to discover, install, update, uninstall, etc VSCode plugins
My main factor is I don't want to have to context switch across applications. I don't feel like I'm doing that if I stay in the terminal. As such, I would imagine if I were a VSCode user, I'd prefer a git plugin there.
VCS is very much tied to the code, so I think it makes sense to co-locate.