Re:Git Undo
by recursive on Thursday August 25, 2016 @11:12AM
(#12359599)
By specifying the parts you want to include when you commit. I think it's unnecessary for any reasonable work flow, and doesn't manage to break even on its benefit vs. cognitive cost.
[ Parent
| on HN ]
So you want a long command line argument were you tag specific line numbers and have to get it all right at once? That sounds terrible to me.
Being able to add bits and pieces to your staging area and then once you've got it all ready commit is pretty useful.
I guess I just don't see the cognitive cost as being particularly high. It's a pretty simple model.
I really would prefer not to even use a CLI for this operation, since I think it's not well suited to the kind of interaction commits entail.
A "staging area" is a useful concept, but it's not one that needs to exist outside the UI of whatever tool you're using to generate the commit.