Created
November 20, 2014 00:44
-
-
Save mminer/0537b24366cb7be46370 to your computer and use it in GitHub Desktop.
Lists a Git repository's tags with their corresponding SHA1 hashes.
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
#!/usr/bin/env bash | |
tags="$(git tag --list)" | |
for tag in $tags; do | |
hash="$(git rev-list $tag | head -n 1)" | |
echo "${hash} ${tag}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment