Created
May 3, 2016 10:31
-
-
Save atifazad/61abb37fb2328c60b1d4b658e66deb3a to your computer and use it in GitHub Desktop.
Hash of last commit of a Git branch
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
Get hash of last commit (eg. 1fa01e4b90a09069a5aa6482a71c5f76118eef9e) | |
git rev-parse HEAD | |
Get short hash of last commit (eg. 1fa01e4) | |
git rev-parse --short HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment