• lysdexic
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    What a treat. I have to admit that my mental model of git cherry-pick was just “it takes a change and applies it as a patch”. I guess it isn’t. That would explain a couple of experiences I had where a cherry-pick came with a lot of unrelated crap tied to it.

    TIL.

  • TechNom (nobody)
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I saw the discussion that led to this, live on fediverse. Confusion and surprise were the dominating themes. Even the best git gurus were taken by surprise and even a partial clarification needed checking the git source code. It says how difficult git is as a tool. It’s likely that the git developers are the only ones who know how to use it correctly. While this is not unusual for custom tools, it shows how much thought should go into UI design for public software.

    I’m surprised that the 3-way merge isn’t well known. In the earlier days of Git, the 3-way merge was its selling point, over contemporary alternatives like CVS and SVN (where people used to avoid branching, since merges broke far too often). There is a command called diff3 that can do 3-way diffs and merges. Many GUI diff tools like Meld and KDiff3 have built-in 3-way diff functionality. The git book also talks about how this is done.