Skip to content

Instantly share code, notes, and snippets.

@KurtJacobson
Last active September 29, 2017 01:37
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 KurtJacobson/2b1bc6ad19bf9bc872fd9750d9aebc69 to your computer and use it in GitHub Desktop.
Save KurtJacobson/2b1bc6ad19bf9bc872fd9750d9aebc69 to your computer and use it in GitHub Desktop.
Random Useful Commands

git

Count number of lines in a git working tree
git diff --shortstat `git hash-object -t tree /dev/null`

Current branch name
git rev-parse --abbrev-ref HEAD

Gets current sort hash
git rev-parse --short HEAD
git rev-parse --verify --short HEAD

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