Skip to content

Instantly share code, notes, and snippets.

@rordi
Last active September 16, 2020 07:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rordi/4b97993feb846ae2a17e5d45eb33b47f to your computer and use it in GitHub Desktop.
Save rordi/4b97993feb846ae2a17e5d45eb33b47f to your computer and use it in GitHub Desktop.
Commands to get basic info about a git commit

Commands to get basic info about a git commit

  • Deploy Timestamp: date +"%Y-%m-%d %H:%M:%S"
  • Git Repo: basename `git rev-parse --show-toplevel`
  • Git Branch: git rev-parse --abbrev-ref HEAD
  • Git Commit Long Hash: git rev-parse HEAD
  • Git Commit Short Hash: git rev-parse --short HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment