Created
May 2, 2017 19:28
-
-
Save NathanielInman/16c8cf78f252e2a06bb7c7e76adf679a to your computer and use it in GitHub Desktop.
Get hashes for git tags
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
# List all branches and their hashes on remote | |
git ls-remote --head | |
# List all tags and their hashes on a remote server | |
git ls-remote -t | |
# Get hash for a specific tag | |
git rev-parse v1.1.0 | |
# Get last tag for current branch | |
git describe --tags --abbrev=0 | |
# Get hash for last tag on current branch | |
git rev-parse $(git describe --tags --abbrev=0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment