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

Re: How about cherry-pick --squash?

From
Sean <seanlkml@sympatico.ca>
Date
Mar 14, 2008, 15:25 UTC
Message-ID
<BAYC1-PASMTP015BC6B5B35F790E097CBEAE0A0@CEZ.ICE>
In-Reply-To
<46dff0320803140815q5a342f5fjdde02c6b5fde4e5f@mail.gmail.com>

On Fri, 14 Mar 2008 23:15:32 +0800 "Ping Yin" <pkufranky@gmail.com> wrote:

Show 7 quoted lines
> Sometimes i want to cherry pick a commit, but i don't want the commit
> message of this commit. What i  want is the patch corresponding to
> this commit to be squashed to the top commit?
> 
> Now i have to type
> 
> git format-patch -1 --stdout  <sha1> | git apply --index && git commit --amend
Hi Ping,
There is an easier way:

$ git cherry-pick -n <sha1> $ git commit -a --amend

HTH, Sean

Previous: Ping YinNext: Ping Yin
Message 2 of 3 in “How about cherry-pick --squash?”
  1. Ping YinMar 14, 2008
  2. SeanMar 14, 2008
  3. Ping YinMar 14, 2008

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.