Created
February 18, 2014 06:58
-
-
Save schnell18/9065883 to your computer and use it in GitHub Desktop.
Get current branch name in script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Quirk and dirty solution | |
| git branch | grep '*' | |
| # Use Git's plumbing command | |
| git rev-parse --abbrev-ref HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment