From: Junio C Hamano Date: Sat, 18 Feb 2006 07:39:26 GMT Subject: Re: Why can't git-rebase back up? Message-ID: <7vhd6xru8h.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <43F5FA10.5020605@op5.se> Andreas Ericsson writes: > The order of precedence works as such: > .git/ > .git/refs/ > .git/refs/tags/ > .git/refs/heads/ > sha1, with git magic to allow abbreviations > > This is why you can't sanely have a branch named HEAD. Actually, you should be able to sanely have a branch named HEAD. When git barebone Porcelain tools _expect_ branch name from the user (not just a random committish), they _ought_ to prefix "refs/heads" in front of it, exactly in order to help disambiguate things. Otherwise you have spotted a bug, so please send in a fix. It is however a different story if you can keep your sanity if you created a branch called HEAD. You have to remember to explicitly say refs/heads/HEAD, where a command wants any committish or treeish.