Re: [DRAFT] Branching and merging with git
From: Junio C Hamano <hidden>
Date: 2016-08-11 19:30:56
linux@horizon.com writes:
We seem to have developed a consensus on the desirability of allowing HEAD to point outside refs/heads, postponing the check until commit/merge time. (At least, junkio and Linus seemed to like it.)
Yes, and I am actually interested in at least doing the initial
damage assessment myself but people are welcome to beat me to
it. The easies part would be to just try writing a bare SHA-1
to .git/HEAD with:
H=$(git-rev-parse --verify HEAD)
echo $H >.git/HEAD
and see what breaks and start picking up the pieces from there.
I'd like to learn more about the zillion options to git-log. If people feel like sharing useful incantations, it would be be very helpful to give a concrete example of its usefulness, preferably within the git history itself. (Are there any octopus merges in git's history? If not, could I ask for one for pedagogical value?)
git.git itself is full of them, but the very first octopus (it actually is a pentapus) is rather nice to watch in gitk: 211232bae64bcc60bbf5d1b5e5b2344c22ed767e You can look for them with: git rev-list --parents HEAD | grep '..* ..* ..* ..* ..* ..*' Repeat as many " ..*" as the number of parents you would want to require. I knew the very first one was pentapus (I did it) so I wrote six ..* there (one for the commit, one each for parents). Len's dodecapus in linux-2.6.git is this one: 9fdb62af92c741addbea15545f214a6e89460865 It is very interesting to watch it with "git show". Len has another one in August: da547d775fa9ba8d9dcaee7bc4e960540e2be576