All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pete Harlan <pgit@pcharlan.com>
To: git@vger.kernel.org, jensseidel@users.sf.net
Subject: Re: Error in git-cherry-pick manpage?
Date: Tue, 18 Nov 2008 11:34:07 -0800	[thread overview]
Message-ID: <492318AF.8080004@pcharlan.com> (raw)
In-Reply-To: <20081114151426.GA20985@merkur.sol.de>

Jens Seidel wrote:
> Hi,
> 
> I try to use git cherry-pick to combine multiple commits but I'm confused
> about the second sentence of the description:
> 
> "Given one existing commit, apply the change the patch introduces, and
> record a new commit that records it. This requires your working tree to be
> clean (no modifications from the HEAD commit)."
> 
> I intent to use it as follows:
> 
>  git cherry-pick -x --no-commit 2e855ae
>  git cherry-pick -x --no-commit 0c1151
>  ...
> 
> After the first invocation my working tree will not be clean but contain
> changes in the index.
> 
> Does this mean that's a wrong usage of cherry-pick?

If it is, you might try this:

  git cherry-pick -x 2e855ae             # Let it commit
  git cherry-pick -x --no-commit 0c1151  # Will stage changes
  git commit --amend
  # Repeat last two steps as needed...

--Pete

      reply	other threads:[~2008-11-18 19:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-14 15:14 Error in git-cherry-pick manpage? Jens Seidel
2008-11-18 19:34 ` Pete Harlan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=492318AF.8080004@pcharlan.com \
    --to=pgit@pcharlan.com \
    --cc=git@vger.kernel.org \
    --cc=jensseidel@users.sf.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.