git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Cherry picking instead of merges.

From
David Brown <git@davidb.org>
Date
Jul 3, 2008, 20:53 UTC
Message-ID
<20080703205329.GA17923@old.davidb.org>
In-Reply-To
<32541b130807031315j3d9b7d77y277e3cb994ab0964@mail.gmail.com>
On Thu, Jul 03, 2008 at 04:15:22PM -0400, Avery Pennarun wrote:
>Unfortunately, since your mismerged branches are already published,
>rewriting history would cause a lot of pain for everyone.  It would be
>better to avoid doing that entirely.  However, I can see why you'd
>want to do that in order to make future git-bisect easier.

It's only sitting in a private developer's branch. I want to do the merge properly, but I'm just trying to figure out how to get the conflict resolution out of his work.

Show 5 quoted lines
>Basically, if you're going to try to fix the git-bisect intermediate
>versions, you're going to have to rewrite history anyway; in which
>case, why not just make your developer's cherry-picked branch the
>official one?  Then your problems are solved, other than getting all
>your developers onto the new history.

Once we start cherry picking the changes from Company B, we have a different set of changes from them, and future merges will get harder and harder.

Show 5 quoted lines
>This will apply the correct conflict resolution to the tip of your
>newest branch.  All the revisions between X and HEAD will still be
>broken, but that's usually better than trying to rewrite history and
>pretend the broken revisions never existed.  You can always use "git
>bisect skip" for cases like that.

Except we already know that the broken change is inside of the broken revisions.

It turns out that things are more messed up than I thought. This developer had done a 'git push' with some manual refs and pushed what was supposed to be a merge into an unmerged branch.

I've spoken with all of the developers who use this tree, and everyone agrees that rewinding the tree is the best way to go. Now just time to trudge forward and learn.

But, it makes for a good new rule: no cherry-picking other people's changes.

David
Previous: Avery PennarunNext: Samuel Tardieu
Message 4 of 13 in “Cherry picking instead of merges.”
  1. David BrownJul 3, 2008
  2. Alex RiesenJul 3, 2008
  3. Avery PennarunJul 3, 2008
  4. David BrownJul 3, 2008
  5. Samuel TardieuJul 3, 2008
  6. Linus TorvaldsJul 3, 2008
  7. David BrownJul 3, 2008
  8. Björn SteinbrinkJul 4, 2008
  9. David BrownJul 4, 2008
  10. Linus TorvaldsJul 4, 2008
  11. Johannes SixtJul 4, 2008
  12. Linus TorvaldsJul 4, 2008
  13. Linus TorvaldsJul 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.