Prints the name of the checked-out branch and nothing else, with no decoration. Unlike git rev-parse --abbrev-ref HEAD it exits non-zero on a detached HEAD. Scripts prefer it when they need a clean branch name.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.