Re: fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 8, 2007, 10:33 UTC
- Message-ID
- <7vfy52ka63.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20070608102113.GB2335@cip.informatik.uni-erlangen.de>
Thomas Glanzmann <thomas@glanzmann.de> writes:
> I see it. Last line. I tried to clone from a repository which itself had a > detached HEAD. Could that be the problem?
Ah, our mails crossed.
There is no reason to forbid cloning of a repository whose HEAD is detached, but detached HEAD is a relatively recent invention, and I would not be surprised if that was indeed the breakage, nor nobody has hit this so far.
It's sufficiently late here so I do not think I would be able to take a look at it tonight, though. Sorry.
Just in case you need unblocking (although I think you know how already), you should be able to continue with:
$ git rev-parse v2.6.20^0 >.git/HEAD
$ git read-tree HEAD
$ git checkout-index -f -q -u -aThat would give you a normal detached state at v2.6.20; you should be able to come back to your branches with usual "git checkout".