News for hackers. Stuff that matters.
Re:Git pretty by christop on Saturday September 06, 2014 @12:46PM (#8278749)
"Split off a logical chunk from your mess, stage it" should really be another box with "git add -p".

Being able to pick and choose (and even edit) individual chunks to be staged is enormously useful. Quite possibly my favourite feature of git.

Re:Git pretty by philsnow on Sunday September 07, 2014 @01:28AM (#8280417)
Once upon a time I used darcs, where the interactive staging / interactive committing feels even nicer. Git's "git add -i" stuff has always seemed crufty to me.

For instance, in git add -i, the command to stage changes is called "update". The command to unstage is called "revert". Further, does _anybody_ use interactive adding when not intending to stage individual hunks from some file ? Yet there are all these other commands in there to stage/unstage whole files, which are more easily and uniformly done from the command line tools (well, when you accept that staging is called "add"ding on the command line and unstaging is called "reset"ting).

Re:Git pretty by eru on Wednesday September 17, 2014 @02:55PM (#8331702)
> Quite possibly my favourite feature of git.

Mine, too. Fortunately, mercurial has that feature, too. (Though you might need a plugin.)

Re:Git pretty by digikata on Saturday September 06, 2014 @02:28PM (#8279062)
I agree with the git add -p , but I feel that at point, it often should be followed by a stash then a rebuild and/or some testing. Next, commit and unstash to continue.
Re:Git pretty by bobthecow on Saturday September 06, 2014 @03:29PM (#8279233)
Yep yep. `git add -p`, `git stash -p`, etc. That's exactly why that bit of the chart isn't very specific. There's a whole workflow right there, in that one little cycle. One of these days I'll get around to writing that one up :)
Re:Git pretty by bulte-rs on Saturday September 06, 2014 @04:09PM (#8279325)
git isolate! I've been trying to make something like this :( Unfortunately my git-fu is failing me.
Re:Git pretty by __david__ on Saturday September 06, 2014 @04:38PM (#8279391)
Mine too.

If you ever want that functionality on a non-git VCS, I co-wrote a tool that does just that (it predates git, actually) called commit-patch[1]. It integrates into Emacs nicely and also has 'commit-partial' for a nice command-line interface.

[1] http://porkrind.org/commit-patch/

Re:Git pretty by serge2k on Saturday September 06, 2014 @02:03PM (#8278978)
That does sound useful, I have a bad habit of letting things get messy.

Lots and lots of rebase -i.

Re:Git pretty by adregan on Saturday September 06, 2014 @01:21PM (#8278850)
git add -p has absolutely changed my work flow and commit histories for the better.
Re:Git pretty by adestefan on Saturday September 06, 2014 @07:24PM (#8279839)
I find that git add -p is a crutch and everytime I need to use it I scold myself for not committing more often.
Re:Git pretty by bobthecow on Saturday September 06, 2014 @12:59PM (#8278783)
That's in the tl;dr