Re: git merging
- From
- Jeff 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