4 ms·
Biggest plus for me: "git checkout A...B" is a way to detach HEAD at the merge base between A and B. I always find myself trying to figure out where two branc
by epall 17y ago
Biggest plus for me:
"git checkout A...B" is a way to detach HEAD at the merge base between A and B.
I always find myself trying to figure out where two branches meet in the history.
- boundlessdreamz 17y agoCan you explain this ?
- mbrubeck 17y ago"A..B" here just means the closest common ancestor of A and B, which could be branches or arbitrary commits. You might use this if you have a branch from someone else and you just want to know how long ago it diverged from your own branch. Or you might rewind to the common ancestor of two temporary branches before doing something like squashing the commits from each branch onto the ancestor, one after the other.
- boundlessdreamz 17y agoAwesome. Thanks for explaining. That does sound very useful.
- scorpion032 17y agoIt is A...B, BTW.
- basman 17y agoAlthough note that even before, git checkout `git merge-base A B` was always possible