Skip to content

Instantly share code, notes, and snippets.

@wonderbeyond
Last active January 23, 2022 08:19
Show Gist options
  • Save wonderbeyond/b81160f831c465b7c05f8bff720cb199 to your computer and use it in GitHub Desktop.
Save wonderbeyond/b81160f831c465b7c05f8bff720cb199 to your computer and use it in GitHub Desktop.
Git tips

Get current tag or commit hash

REV="$(git describe --tags 2> /dev/null || git rev-parse HEAD)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment