On Fri, Jan 29, 2010 at 13:16, Ron1 <ron1@xxxxxxxxxxx> wrote: > I know that master^ is a commit and not a branch. I thought I was > invoking the third variant of git-checkout (as given on the git-checkout > man page) and checking out a commit (which the man page calls a > tree-ish). > > In any case, since my question seems to have sparked some discussion, > I'd like to offer two observations: > > 1. Saying "isn't a local branch" is mightily confusing, because it is > ambiguous whether the problem is that it isn't a branch or if it isn't > local. > > 2. If I pass something to git checkout (or any other command for that > matter) that it expects to be a branch but isn't a branch it would be > much better if it just gave an error and did nothing rather than give a > (confusing) warning and try to extrapolate the user's intentions. > Whatever a user could possibly mean by 'git checkout master^' it is > almost certainly not what that command actually does at the moment. > I don't think that #2 would be possible. My understanding is that branches are basically just there as convenient "names" for arbitrary commits. In other words (in my understanding): There is no place that expects a "branch" where a commit (SHA-1) would not work (and be a perfectly valid use). -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html