* Error in git-cherry-pick manpage?
@ 2008-11-14 15:14 Jens Seidel
2008-11-18 19:34 ` Pete Harlan
0 siblings, 1 reply; 2+ messages in thread
From: Jens Seidel @ 2008-11-14 15:14 UTC (permalink / raw)
To: git
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?
Jens
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Error in git-cherry-pick manpage?
2008-11-14 15:14 Error in git-cherry-pick manpage? Jens Seidel
@ 2008-11-18 19:34 ` Pete Harlan
0 siblings, 0 replies; 2+ messages in thread
From: Pete Harlan @ 2008-11-18 19:34 UTC (permalink / raw)
To: git, jensseidel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-18 19:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-14 15:14 Error in git-cherry-pick manpage? Jens Seidel
2008-11-18 19:34 ` Pete Harlan
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).