Skip to content

Instantly share code, notes, and snippets.

@mamchenkov
Last active July 23, 2024 19:41
Show Gist options
  • Select an option

  • Save mamchenkov/930900 to your computer and use it in GitHub Desktop.

Select an option

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
@LEUNGUU
Copy link

LEUNGUU commented May 6, 2022

Thanks. It helps!

@wukaipeng-dev
Copy link

git rev-parse HEAD

Good

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