git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [DRAFT] Branching and merging with git

From
Junio C Hamano <junkio@cox.net>
Date
Nov 18, 2006, 00:40 UTC
Message-ID
<7virhdh9j8.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20061118001355.23488.qmail@science.horizon.com>
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.
Show 7 quoted lines
> 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
Previous: Jakub NarebskiNext: J. Bruce Fields
Message 4 of 10 in “Re: [DRAFT] Branching and merging with git”
  1. J. Bruce FieldsNov 17, 2006
  2. linux@horizon.comNov 18, 2006
  3. Jakub NarebskiNov 18, 2006
  4. Junio C HamanoNov 18, 2006
  5. J. Bruce FieldsNov 19, 2006
  6. Git manualsPetr Baudis, Nov 19, 2006
  7. Jakub NarebskiNov 19, 2006
  8. Robin RosenbergNov 19, 2006
  9. J. Bruce FieldsNov 19, 2006
  10. Documentation: add a "git user's manual"J. Bruce Fields, Nov 26, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.