Created
June 13, 2023 08:04
-
-
Save bastionkid/341c44d9f757168c3744920dd8a91693 to your computer and use it in GitHub Desktop.
Shell script to generate short SHA from git head commit
This file contains 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/bash | |
commit_id=$(git rev-parse HEAD) | |
echo "${commit_id:0:7}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment