Make get-git-id work event in detached HEAD.
Explain changes in comments.
Merge pull request #1284 from rdicosmo/fix-get-git-version

Fix get git version