From: Junio C Hamano Date: Mon, 07 Feb 2011 20:53:11 GMT Subject: Re: [1.8.0] git checkout refs/heads/foo checks out branch foo Message-ID: <7vwrlbtvm0.fsf@alter.siamese.dyndns.org> In-Reply-To: Martin von Zweigbergk writes: > Proposal: > > 'git checkout refs/heads/foo' (or 'git checkout heads/foo' for that > matter) does not check out the branch, but instead detaches HEAD at > foo. Yes, and it is deliberately so as it is a guaranteed-sure way for scripts to work around potential ref ambiguity when talking about the branch called 'foo' to spell it out with leading refs/heads/. As long as you do not break scripts that guard against breakage you are proposing by saying "refs/heads/foo^0", we are Ok with the proposal, I think. > Migration plan: > > Make 'git checkout refs/head/foo' emit a warning in the next 1.7.x > explaining that its semantics will change in 1.8.0. Then change the > behavior in 1.8.0 and remove the warning. Reasonable. Thanks.