git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-cherries

From
TNThien-Thi Nguyen <ttn@gnuvola.org>
Date
Mar 2, 2012, 11:19 UTC
Message-ID
<87ehtb8d2p.fsf@gnuvola.org>
In-Reply-To
<20120227192746.GC1600@sigill.intra.peff.net>

() Jeff King <peff@peff.net> () Mon, 27 Feb 2012 14:27:46 -0500

   So if I understand correctly, this just creates a series of commits, one
   per hunk, of what's in your working tree. And the commit messages won't
   be useful, so this is really about recording the work somewhere so that
   you can pick it out later using "git cherry-pick --no-commit", make a
   real commit from some subset of the cherries, and then throw away the
   cherries?
   I think you could do this more simply by putting everything in a single
   throw-away commit, then using "git checkout -p $throwaway" to pick the
   individual cherries from the single commit. You don't grab the commit
   message from $throwaway as you might with cherry-pick, but by definition
   it's not a very good commit message anyway.
Cool; "git checkout -p" was what i was missing.  Thanks for the tip!
Previous: Jeff King
Message 3 of 3 in “git-cherries”
  1. Thien-Thi NguyenFeb 27, 2012
  2. Jeff KingFeb 27, 2012
  3. Thien-Thi NguyenMar 2, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.