Comment by seba_dos1
> but not if it's checked out
...and for a good reason that should be apparent to anyone who understands git's model (HEAD points to a ref in this case, so if you suddenly change what that ref points to without updating the working tree you create an inconsistency).
You can do that manually of course (with `git update-ref` or even a text editor), but then you get to clean up the mess yourself.
To me that looks like git is leaking implementation details left and right.
So much for "a branch is simply a pointer to a commit"...