5 ms·
I find splitting hunks a pain. I wish I could just split by line, would be a great feature.
by zikohh 2mo ago
I find splitting hunks a pain. I wish I could just split by line, would be a great feature.
- petepete 2mo agoI've used tig for longer than I can remember for my selective staging needs.
- LVB 2mo agoUse 'e' in -p mode and you can edit the hunks as you wish, choose lines, etc.
- feelamee 2mo agoit'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.
- embedding-shape 2mo agoThe 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.
- arccy 2mo agouse jj, the default is to select by line
- KwanEsq 2mo agoMercurial'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.
- elevation 2mo ago> splitting hunks a pain Sublime Merge for the win; a fantastic visual interface with context and reversible inputs. Don't leave home without it!
- PaulDavisThe1st 2mo agoto make the list closer to complete, magit in emacs allows this (Ctrl-space on the line, done).
- dahart 2mo agoIn 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.