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

Re: git merging

From
JGJeff Garzik <jgarzik@pobox.com>
Date
Jun 17, 2005, 23:51 UTC
Message-ID
<42B36207.3020209@pobox.com>
In-Reply-To
<Pine.LNX.4.58.0506171629320.2268@ppc970.osdl.org>
Linus Torvalds wrote:
> Ok. The most likely reason is that your main branch is not a symlink to 
> ".git/refs/***" at all, but just a regular ".git/HEAD" file.
This is definitely not the case; my .git/HEAD is _always_ a symlink.

My git-switch-tree script, attached, demonstrates how .git/HEAD symlink is retargetted to the specified branch. My workflow depends on .git/HEAD being a symlink.

I'll see if I can reproduce with the latest git.
	Jeff
#!/bin/sh
if [ "x$1" != "x" ]
then
	if [ ! -f .git/refs/heads/$1 ]
	then
		echo Branch $1 not found.
		exit 1
	fi
	( cd .git && rm -f HEAD && ln -s refs/heads/$1 HEAD )
fi
git-read-tree -m HEAD && git-checkout-cache -q -f -u -a
Previous: Linus TorvaldsNext: Linus Torvalds
Message 5 of 16 in “Re: git merging”
  1. Linus TorvaldsJun 17, 2005
  2. Jens AxboeJun 17, 2005
  3. Jeff GarzikJun 17, 2005
  4. Linus TorvaldsJun 17, 2005
  5. Jeff GarzikJun 17, 2005
  6. Linus TorvaldsJun 18, 2005
  7. Jens AxboeJun 20, 2005
  8. Matthias UrlichsJun 20, 2005
  9. Jens AxboeJun 20, 2005
  10. Linus TorvaldsJun 20, 2005
  11. Daniel BarkalowJun 20, 2005
  12. Matthias UrlichsJun 20, 2005
  13. Jens AxboeJun 20, 2005
  14. Linus TorvaldsJun 20, 2005
  15. Jens AxboeJun 21, 2005
  16. Linus TorvaldsJun 21, 2005

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.