how to get hash code of current git commit code example Example: git get current commit hash git rev-parse HEAD