use commit hash as git branch with detached HEAD

Abbreviated to 7 characters to match `git rev-parse --short HEAD`.
Merge pull request #580 from andrewgregory/detached_head

use commit hash as git branch with detached HEAD