Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 312 Bytes

what-is-the-current-branch.md

File metadata and controls

13 lines (9 loc) · 312 Bytes

What Is The Current Branch?

This question can be answered with one of git's plumbing commands, rev-parse.

$ git rev-parse --abbrev-ref HEAD

The --abbrev-ref flag tells git-rev-parse to give us the short name for HEAD instead of the SHA.

source