Use Utils.getGitCommitId only when needed

- Use Utils.getGitCommitId only when needed when useGitCommitId = true