Check if remot git is already on commit
fixed a bug with a newer git version

git rev-parse HEAD fails if there is no commit in the repo yet (first
deploy)