Last active
May 3, 2024 00:28
-
-
Save mamchenkov/930900 to your computer and use it in GitHub Desktop.
Find current git commit id/hash
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
$ git log -1 | grep ^commit | cut -d " " -f 2 | |
dab96492ac7d906368ac9c7a17cb0dbd670923d9 | |
$ git log -1 | grep ^commit | awk '{print $2}' | |
dab96492ac7d906368ac9c7a17cb0dbd670923d9 |
Thanks. It helps!
git rev-parse HEAD
Good
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git log --branches -1 --pretty=format:"%H"