Retrieves the git sha from GIT_SHA if available

On Heroku, the directory where the app deployed is not a git repo. Instead,
we use the GIT_SHA environment variable.