Skip to content

Instantly share code, notes, and snippets.

@mamchenkov
Last active February 13, 2023 18:22
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mamchenkov/930900 to your computer and use it in GitHub Desktop.
Save mamchenkov/930900 to your computer and use it in GitHub Desktop.
Find current git commit id/hash
$ git log -1 | grep ^commit | cut -d " " -f 2
dab96492ac7d906368ac9c7a17cb0dbd670923d9
$ git log -1 | grep ^commit | awk '{print $2}'
dab96492ac7d906368ac9c7a17cb0dbd670923d9
@Penggeor
Copy link

Penggeor commented May 7, 2022

git rev-parse HEAD

Good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment