Normally there isn't much of a difference. The key is that you had conflicts to resolve. From the man pages http://csurs.csr.uky.edu/cgi-bin/man/man2html?1+git-checkout
git checkout [--patch] [] [--] ...
...
The index may contain unmerged entries because of a previous failed merge. By default, if you try to check out such an entry from the index, the checkout operation will fail and nothing will be checked out. Using -f will ignore these unmerged entries. The contents from a specific side of the merge can be checked out of the index by using --ours or --theirs. With -m, changes made to the working tree file can be discarded to re-create the original conflicted merge result.
You were using checkout
this way when it was failing. So by design, the checkout will fail due to the unmerged changes (not resolving the conflicts). Adding the HEAD
told git which "branch" to use and so will actually checkout the file.
HEAD refers to the specific SHA that you are at in your repo. So you are telling git where to pull the files from in the same way that you would for a different branch.