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