git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How about cherry-pick --squash?
@ 2008-03-14 15:15 Ping Yin
  2008-03-14 15:25 ` Sean
  0 siblings, 1 reply; 3+ messages in thread
From: Ping Yin @ 2008-03-14 15:15 UTC (permalink / raw)
  To: Git Mailing List

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

How about

git cherry-pick --squash <sha1>

-- 
Ping Yin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How about cherry-pick --squash?
  2008-03-14 15:15 How about cherry-pick --squash? Ping Yin
@ 2008-03-14 15:25 ` Sean
  2008-03-14 15:32   ` Ping Yin
  0 siblings, 1 reply; 3+ messages in thread
From: Sean @ 2008-03-14 15:25 UTC (permalink / raw)
  To: Ping Yin; +Cc: Git Mailing List

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

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How about cherry-pick --squash?
  2008-03-14 15:25 ` Sean
@ 2008-03-14 15:32   ` Ping Yin
  0 siblings, 0 replies; 3+ messages in thread
From: Ping Yin @ 2008-03-14 15:32 UTC (permalink / raw)
  To: Sean; +Cc: Git Mailing List

On Fri, Mar 14, 2008 at 11:25 PM, Sean <seanlkml@sympatico.ca> wrote:
> On Fri, 14 Mar 2008 23:15:32 +0800
>  "Ping Yin" <pkufranky@gmail.com> wrote:
>
>
>  There is an easier way:
>
>  $  git cherry-pick -n <sha1>
>  $  git commit -a --amend
>
Thanks, it's simpler.



-- 
Ping Yin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-14 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 15:15 How about cherry-pick --squash? Ping Yin
2008-03-14 15:25 ` Sean
2008-03-14 15:32   ` Ping Yin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).