Understanding git cherry-pick

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]