Skip to content

Instantly share code, notes, and snippets.

@eezing
Last active November 1, 2018 20:39
Show Gist options
  • Save eezing/e8dbe80f434eaaf5e78eb235cab11b97 to your computer and use it in GitHub Desktop.
Save eezing/e8dbe80f434eaaf5e78eb235cab11b97 to your computer and use it in GitHub Desktop.
Notes, code snippets, how to for Git CLI

Git Notes

Notes, code snippets, how to for Git CLI.

Offical Docs

Snippets

delete all local branches

git branch | grep -v "master" | xargs git branch -D

Commands

show-ref

Get identifiable info for a commit.

Examples
  • Abbreviated commit hash by tag: git show-ref v1.0.0 --abbrev --hash --> `e854382

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