git symbolic-ref -q --short HEAD
I use this in scripts that need the current branch name. It will show you the current short symbolic reference to HEAD, which will be your current branch name.
git symbolic-ref -q --short HEAD
I use this in scripts that need the current branch name. It will show you the current short symbolic reference to HEAD, which will be your current branch name.