On Wed, Mar 18, 2009 at 11:05:29AM +0100, Michael J Gruber wrote:
One might even argue that in case of ambiguities, checking out a
detached head would be most appropriate. Really, why impose creation of
certain local branches on a user at all, unless asked for? Detached
heads are natural in git! But I don't really expect positive consensus
on that one...
I'm not sure that detached HEADs are all that natural. It means that:
git clone repo-with-ambiguous-HEAD foo
cd foo
hack hack hack
git commit -a -m msg
is putting your commits "nowhere" (i.e., not on any ref). They are not
accessible for pushing, and when you checkout another branch, they will
be lost (except to the reflog).
So it clearly requires that the user be aware of what is going on, and
that they understand the subtleties of detached HEADs (something that
has caused new user confusion before, I think).
-Peff