How to get the current branch name in Git?

The Solution to How to get the current branch name in Git? is


To display the current branch you're on, without the other branches listed, you can do the following:

git rev-parse --abbrev-ref HEAD

Reference:

~ Answered on 2012-08-27 12:33:46


Most Viewed Questions: