added get-current-ref.sh script

This commit is contained in:
Peter Honeder
2015-06-18 10:27:51 -07:00
parent 8e90f73867
commit 7b2dca96c4
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
branch=$(git for-each-ref --format=$'%(objectname) %(refname:short)' refs/heads | awk "/^$(git rev-parse HEAD)/ {print \$2}")
echo $branch