From: Stephen Bash <bash@genarts.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Understanding git cherry-pick
Date: Wed, 10 Nov 2010 09:04:29 -0500 (EST) [thread overview]
Message-ID: <28509694.654669.1289397869374.JavaMail.root@mail.hq.genarts.com> (raw)
In-Reply-To: <10192863.654644.1289397257054.JavaMail.root@mail.hq.genarts.com>
Hi all-
In helping a coworker yesterday with a git cherry-pick operation, I found my mental model of cherry-pick seems to be flawed. Our goal was to cherry-pick one commit from the current development branch back to the stable release branch (we're still training everyone on the *correct* way to do maintenance fixes). Here's what happened:
$ git checkout release-branch
$ git cherry-pick 8815f3a0c2c248db223e41b0538f0c48b45fe52d
warning: too many files (created: 237 deleted: 2558), skipping inexact rename detection
Automatic cherry-pick failed. After resolving the conflicts, mark the corrected paths with 'git add <paths>' or 'git rm <paths>' and commit the result with:
git commit -c 8815f3a0c2c248db223e41b0538f0c48b45fe52d
git status reported the actual change we wanted from the commit applied cleanly; the conflicts were all added/deleted files between the two branches. The commit only modifies a single file, and the file exists with the same name on both branches.
So what's actually going on here? If the one changed file in the commit merged cleanly, why did the automatic cherry-pick fail? Why does cherry-pick even care about file differences between the two branches that aren't modified by the commit in question? Or is it user error?
Thanks,
Stephen
next parent reply other threads:[~2010-11-10 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <10192863.654644.1289397257054.JavaMail.root@mail.hq.genarts.com>
2010-11-10 14:04 ` Stephen Bash [this message]
2010-11-10 19:43 ` Understanding git cherry-pick Camille Moncelier
2010-11-10 20:01 ` Stephen Bash
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=28509694.654669.1289397869374.JavaMail.root@mail.hq.genarts.com \
--to=bash@genarts.com \
--cc=git@vger.kernel.org \
/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 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).