This happens often in my work recently. For example, I was in the master branch, and I want to go back to a specific commit that I see from the 'git log' command. After I check out that previsou commit (for example, 6695724994), if I do 'git branch', I see this message.
ckim@ckim-ubuntu:~/prj/some/dir$ git branch
* (HEAD detached at 6695724994)
master
I thought 'git log' shows only commit in current branch, so I went to that previous commit, but why am I end up in a detached commit? What is the case?