I wonder, is not HEAD
is the current branch? As far as I'm concerned it is. But this shows that this is not the case:
$ git branch
* develop
master
So the current branch is develop. But HEAD is not:
$ git branch -r
origin/HEAD -> origin/master
origin/develop
origin/master