Created
January 7, 2026 13:38
-
-
Save sungmin-park/675ff077ebf5cd9f4897b480579dc537 to your computer and use it in GitHub Desktop.
git-revision.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -euo pipefail | |
| test -z "$(git status --porcelain)" && echo "$(git rev-parse HEAD)" || echo "$(git rev-parse HEAD)-dirty" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment