Comment Comment by ryenus Nowadays there's the `--show-current` option: git branch --show-current See https://git-scm.com/docs/git-branch parent ryenus 5 years ago