Command
git symbolic-ref
Read the current symbolic branch target. A detached HEAD returns a nonzero status; --quiet suppresses the diagnostic.
Formal Syntax & Structure
git syntaxgit
git symbolic-ref --short HEADWorking Example
Example Snippetgit
git symbolic-ref --short HEAD