That is not the way to go about it. You cannot start forgetting about
detached heads and come back to it afterwards like an afterthought.
The exact same argument could be said if you did 1300 operations on a
single branch, say master. What would master@{yesterday} tell you?
What will it tell you one minute from now? Now suppose that you have
only one branch and therefore HEAD reflog would be a duplicate of master
reflog.
Answer: it would carry the same kind of confusion as your example above.
Then simply use @{15 minutes ago}. You'll even save yourself some
typing! It is not like if you have to type HEAD for most operations
anyway since HEAD is the likely default in most cases. So you may even
forget that the HEAD entity exists and be just fine.
But HEAD is still a moving pointer and we might want to know that it
switched from one branch to another at some point. And the only way for
that to be sensible is by having a separate reflog for HEAD that is the
exact log of every operations you perform regardless of the actual
branch you might be on.
HEAD _does_ get detached. It becomes loose in the air. It doesn't drag
any
branch
pointer with it. And everything you do on top of a detached HEAD will
be forgotten as soon as you leave it (and the eventual reflog for HEAD
expires) if you don't attach it somehow with a tag or a new branch.
There is no notion of a virtual branch at all, not technically, not
conceptually either.
Nicolas
-
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