Different repositories name their primary development branches differently (e.g. main
, gh-pages
, master
, etc.), and scripts meant to work with multiple repositories need an automated way to discover the current repository's default branch name.
What git
command returns that name?