git branch --show-current
//all branch and current branch
git branch
//current branch
git branch --show-current
git rev-parse --abbrev-ref HEAD
// Check current branch
git branch --show-current
git checkout -b <branch-name>
##Current branch
echo $(git branch --show-current 2> /dev/null)
checking current branch