git checkout: do not allow switching to a tree-ish that is not a commit