{"thread":{"id":"29754","subject":"git-cherries","startedAt":"2012-02-27T10:56:19Z","lastAt":"2012-03-02T11:19:42Z","messageCount":3,"participants":["Thien-Thi Nguyen","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"185513","messageId":"874nucee98.fsf@gnuvola.org","threadId":"29754","inReplyTo":null,"subject":"git-cherries","fromName":"Thien-Thi Nguyen","fromEmail":"ttn@gnuvola.org","sentAt":"2012-02-27T10:56:19Z","receivedAt":"2012-02-27T10:56:19Z","isPatch":false,"sender":{"key":"ttn@gnuvola.org","avatar":null},"body":"For my personal use, i wrote git-cherries, attached.\nIt commits each hunk of every modified file separately\n(creating cherries to cherry-pick later, you see).\n\nI am writing to ask if this is already in Git somewhere,\nand if not, for tips on how to make it faster / more elegant.\n\nPlease cc me in replies, as i am not subscribed.\n\nThanks!\n\n_____________________________________________\n"},{"id":"185547","messageId":"20120227192746.GC1600@sigill.intra.peff.net","threadId":"29754","inReplyTo":"874nucee98.fsf@gnuvola.org","subject":"Re: git-cherries","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-02-27T19:27:46Z","receivedAt":"2012-02-27T19:27:46Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Feb 27, 2012 at 11:56:19AM +0100, Thien-Thi Nguyen wrote:\n\n> For my personal use, i wrote git-cherries, attached.\n> It commits each hunk of every modified file separately\n> (creating cherries to cherry-pick later, you see).\n> \n> I am writing to ask if this is already in Git somewhere,\n> and if not, for tips on how to make it faster / more elegant.\n\nSo if I understand correctly, this just creates a series of commits, one\nper hunk, of what's in your working tree. And the commit messages won't\nbe useful, so this is really about recording the work somewhere so that\nyou can pick it out later using \"git cherry-pick --no-commit\", make a\nreal commit from some subset of the cherries, and then throw away the\ncherries?\n\nI think you could do this more simply by putting everything in a single\nthrow-away commit, then using \"git checkout -p $throwaway\" to pick the\nindividual cherries from the single commit. You don't grab the commit\nmessage from $throwaway as you might with cherry-pick, but by definition\nit's not a very good commit message anyway.\n\n-Peff\n"},{"id":"185908","messageId":"87ehtb8d2p.fsf@gnuvola.org","threadId":"29754","inReplyTo":"20120227192746.GC1600@sigill.intra.peff.net","subject":"Re: git-cherries","fromName":"Thien-Thi Nguyen","fromEmail":"ttn@gnuvola.org","sentAt":"2012-03-02T11:19:42Z","receivedAt":"2012-03-02T11:19:42Z","isPatch":false,"sender":{"key":"ttn@gnuvola.org","avatar":null},"body":"() Jeff King <peff@peff.net>\n() Mon, 27 Feb 2012 14:27:46 -0500\n\n   So if I understand correctly, this just creates a series of commits, one\n   per hunk, of what's in your working tree. And the commit messages won't\n   be useful, so this is really about recording the work somewhere so that\n   you can pick it out later using \"git cherry-pick --no-commit\", make a\n   real commit from some subset of the cherries, and then throw away the\n   cherries?\n\n   I think you could do this more simply by putting everything in a single\n   throw-away commit, then using \"git checkout -p $throwaway\" to pick the\n   individual cherries from the single commit. You don't grab the commit\n   message from $throwaway as you might with cherry-pick, but by definition\n   it's not a very good commit message anyway.\n\nCool; \"git checkout -p\" was what i was missing.  Thanks for the tip!\n"}]}