3 ms·
Does it have a patch mode for stashing? Use case: A commit should only do one thing at a time, but sometimes I'm not as organized. I like to do a whole mess of
by philwelch 16y ago
Does it have a patch mode for stashing?
Use case: A commit should only do one thing at a time, but sometimes I'm not as organized. I like to do a whole mess of work and when I'm ready to commit it, I use git add --patch to separate out unrelated bits of work into separate commits--even if separate bits of work end up in the same file. It's amazing how much a load off your mind this is--you don't have to be quite as OCD while you're coding if you're a little fastidious about your commits later on.
- __david__ 16y agoI pretty much exclusively commit like that nowadays. I use commit-patch (http://porkrind.org/commit-patch http://porkrind.org/commit-patch) which is a pretty thin layer around git but also has emacs integration so you can just diff, edit your hunks with emacs hunk editing tools and then commit the patch. I can't imagine using a VC without the capability any more...