What does `git checkout ...` do?

Solution 1:

This is a degenerate form of this syntax, described in the gitrevisions(7) man page:

   <rev1>...<rev2>
       Include commits that are reachable from either <rev1> or <rev2> but
       exclude those that are reachable from both. When either <rev1> or
       <rev2> is omitted, it defaults to HEAD.

Note that last bit, "When either <rev1> or <rev2> is omitted, it defaults to HEAD". That means that writing ... is equivalent to HEAD...HEAD. When used in git checkout this ends up evaluating to the commit id of HEAD. That is, you're just doing:

git checkout HEAD^{commit}