git branch
should show all the local branches of your repo. The starred branch is your current branch.
If you want to retrieve only the name of the branch you are on, you can do:
git branch | grep \* | cut -d ' ' -f2
git branch
should show all the local branches of your repo. The starred branch is your current branch.
If you want to retrieve only the name of the branch you are on, you can do:
git branch | grep \* | cut -d ' ' -f2