Skip to content

Instantly share code, notes, and snippets.

@christianwish
Last active March 5, 2019 15:01
Show Gist options
  • Save christianwish/1d664e3d1ef89d2fa1645887bb8a7424 to your computer and use it in GitHub Desktop.
Save christianwish/1d664e3d1ef89d2fa1645887bb8a7424 to your computer and use it in GitHub Desktop.
git config --global alias.current 'rev-parse --abbrev-ref HEAD'
# get current branch name
rev-parse --abbrev-ref HEAD
git branch | grep \* | cut -d ' ' -f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment