News for hackers. Stuff that matters.
Re:Git Branches: Intuition and Reality by cassianoleal on Friday November 24, 2023 @05:38AM (#38402509)
> Applying git patches to a repository without the parent is not going to work.

If that's the case (and I'm not saying it isn't - I really don't know), how does cherry-pick work?

I know I can cherry-pick commits in the same repo from entirely separate commit chains, where the only common ancestor is either my local HEAD or some other commit way below both of us.

Why would that not work for different repositories?

Re:Git Branches: Intuition and Reality by jillesvangurp on Saturday November 25, 2023 @02:34PM (#38415956)
It still uses the notion of a common parent to merge a single commit. Works as long as there are no conflicts. As to why that would or would not work, I refer to the git internals section of the Git book. Great stuff. But they are not performing any dark magic here.
Re:Git Branches: Intuition and Reality by cassianoleal on Tuesday November 28, 2023 @05:03AM (#38444206)
So are you saying that if I have completely disconnected commit trees in the same repo, git will refuse to cherry-pick between each other?