Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created February 22, 2018 03:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/4672fd8db2e7c1780eb24209ff4c1dcf to your computer and use it in GitHub Desktop.
Save miguelmota/4672fd8db2e7c1780eb24209ff4c1dcf to your computer and use it in GitHub Desktop.
Bash get first n characters of git commit hash
git rev-parse HEAD | cut -c1-7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment