In git gui, you can highlight a line and right-click to stage or unstage just that line. I just googled it and discovered it’s relatively easy to add a keyboard shortcut for it, but I’m not sure how useful that is.
Mercurial's `hg commit -i` with the curses interface is so much better for this it's not even funny. Fortunately I'd assume Jujutsu's UX is similar, based on arccy's comment.
The whole "Stage this hunk [y,n,q,a,d,k,K,j,J,g,/,e,p,P,?]?" line is pretty intimidating, but I urge anyone who still wants to understand git and be able to (themselves) use it effectively, to do "?" when you see it, read through what each action does and forcefully try them out to see what they do, in some low stakes project. Ends up being a super quick way of staging a whole bunch of work and avoiding staging other, but it's pretty weird at first glance.
it's not as easy as you said.
it can be tricky and complicated to use edit mode.
I usually use it, but still often don't understand - will this edit succeed or why it is failed.
In git gui, you can highlight a line and right-click to stage or unstage just that line. I just googled it and discovered it’s relatively easy to add a keyboard shortcut for it, but I’m not sure how useful that is.
Mercurial's `hg commit -i` with the curses interface is so much better for this it's not even funny. Fortunately I'd assume Jujutsu's UX is similar, based on arccy's comment.
Use 'e' in -p mode and you can edit the hunks as you wish, choose lines, etc.
The whole "Stage this hunk [y,n,q,a,d,k,K,j,J,g,/,e,p,P,?]?" line is pretty intimidating, but I urge anyone who still wants to understand git and be able to (themselves) use it effectively, to do "?" when you see it, read through what each action does and forcefully try them out to see what they do, in some low stakes project. Ends up being a super quick way of staging a whole bunch of work and avoiding staging other, but it's pretty weird at first glance.
it's not as easy as you said. it can be tricky and complicated to use edit mode. I usually use it, but still often don't understand - will this edit succeed or why it is failed.
> splitting hunks a pain
Sublime Merge for the win; a fantastic visual interface with context and reversible inputs. Don't leave home without it!
I've used tig for longer than I can remember for my selective staging needs.
to make the list closer to complete, magit in emacs allows this (Ctrl-space on the line, done).
use jj, the default is to select by line