git get current commit short hash code example Example: git get current commit hash git rev-parse HEAD