> Like how easy is it to selectively stage portions of files in the git CLI?
It’s not hard (`git add -p`) unless you need line-wise selection.
The main issue in my experience is that it’s completely linear so you need perfect memory and to never make any mistakes: git shows each hunk individually and tells you to make your choice before it shows the next, no take-backs.
Magit shows the entire diff and lets you jump around, and selectively unstaging is just a “d s” away.
> I think 'git reset -p' lets you unstage a selection
That requires finishing the current staging, moving to unstaging, processing the unstaging (also a linear hunk-wise process), restarting the ataging, and remembering to skip the stuff you’d mistakenly staged.
The workflow of magit is much easier here, and the staging / unstaging integrates very well with reviewing the local or staged diff. Crafting good commits has way less friction and error recovery is much better.
Importantly, and this is why Emacs users tend to love Magit, the workflow integrates well with rest of Emacs. Your staging and diff buffers are just that - Emacs buffers. Meaning all your quality-of-life configurations and extensions are available as well.
For example, the fact that you can just jump around the buffer and stage/unstage things as you go, means you're free to use whatever you most like for that "jumping around" part. Incremental search? Sure. Ace-jump? Yes. M-x occur? If you must.
Magit on a bare-bones Emacs is extremely ergonomic on its own, but if you use and adapt Emacs for yourself, all the improvements compound on each other.
It’s not hard (`git add -p`) unless you need line-wise selection.
The main issue in my experience is that it’s completely linear so you need perfect memory and to never make any mistakes: git shows each hunk individually and tells you to make your choice before it shows the next, no take-backs.
Magit shows the entire diff and lets you jump around, and selectively unstaging is just a “d s” away.