DEV Community

Discussion on: Easily get current branch name in git

Collapse
hawkinjs profile image
Josh Hawkins

While not a fancy one-liner or anything, I tend to just use git status to see "On branch ____" and just copy that as needed. Not great for scripting but easy to remember

Collapse
taylor profile image
Taylor D. Edmiston

This is what I do too. Or in Sublime using the Git plugin, activate the command palette then type "br" which jumps to "Git: Change Branch" with an asterisk next to the current branch.