Skip to content

Instantly share code, notes, and snippets.

@mamchenkov
Last active May 3, 2024 00:28
Show Gist options
  • 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