Obtenga el nombre actual de la rama Git
git branch --show-current
Average Ant
git branch --show-current
git branch -a # it will show an astrick * like *master
git branch --show-current # source == git remote --help
git rev-parse --abbrev-ref HEAD