TIL! Good to know, thanks
Git
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Resources
Rules
- Follow programming.dev rules
- Be excellent to each other, no hostility towards users for any reason
- No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.
Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.
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.
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.