Once the user knows what HEAD~20 means, I think it is safe to
assume that the user knows what the branches are.
"git checkout master" will barf and suggests the user possible
common exits; "checkout -f" if there is nothing of value,
"checkout -b <branch>" or if they want to build on the current
state.
And once the user who knows what the branches are sees such, and
especially with the help from $PS1 hack of bash-completion in
contrib/ section, the user will learn to do "checkout -f" after
wandering around for sightseeing on a detached HEAD, and at that
point the annoying error message will not be even seen.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html