PowerShell/scripts/get-current-ref.sh
2015-06-18 10:27:51 -07:00

6 lines
153 B
Bash
Executable file

#!/bin/bash
branch=$(git for-each-ref --format=$'%(objectname) %(refname:short)' refs/heads | awk "/^$(git rev-parse HEAD)/ {print \$2}")
echo $branch