News for hackers. Stuff that matters.
Re:Show HN: I rebuilt the only parts of my IDE I use, in Rus... by xtracto on Monday June 22, 2026 @05:02PM (#48636139)
I'm curious, what's some user-friendly terminal based tool to say stage only a couple of discontiguous lines from changes in a single file to commit in Git?

I think I've tried the git command line "interactive" mode, and is really painful. I find myself going to an IDE, selecting the line and right-clicking + "stage selected ranges" to achieve that.

Re:Show HN: I rebuilt the only parts of my IDE I use, in Rus... by albinn on Monday June 22, 2026 @06:41PM (#48637400)
Lazygit is incredibly capable for everything (including this). I don't touch the git cli anymore.
Re:Show HN: I rebuilt the only parts of my IDE I use, in Rus... by mega_dean on Monday June 22, 2026 @06:50PM (#48637531)
Lazygit for a standalone program, or magit for an emacs package (some people use a different editor and just treat emacs+magit as a dedicated git frontend).
Re:Show HN: I rebuilt the only parts of my IDE I use, in Rus... by sshine on Wednesday June 24, 2026 @01:53AM (#48655703)
> terminal based tool to say stage only a couple of discontiguous lines

Have you tried `git add -p`?

There are cases it doesn’t handle well, like if you want something at the bottom of a file with lots of irrelevant changes. And if you want one line but not the line immediately below, then splitting doesn’t work without starting the interactive editor, which can be confusing.