Allow deploying from a detached head

Allows deploying from git version 1.7.5 from a detached head
See http://git.661346.n2.nabble.com/error-with-git-push-origin-HEAD-newbranch-td6333596.html
Merge pull request #12 from healthio/master

Allow deploying from a detached head