LucasLarson / git-default-branch

🌳  What’s in a name? It doesn’t matter. Find the name of a Git repository’s default branch with a POSIX-compliant shell script.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

git default-branch

🌳 What’s in a name? It doesn’t matter.

GitHub Super-Linter AGPL

What

During the course of versioning software history, myriad names have been used as the default for the chief branch, including trunk, development, develop, dev, master, main, mainline, baseline, and sometimes even default.

Why

Finding Oh My Zsh’s heuristic insufficient (Oh My Zsh decides the default branch is named main if that branch exists, otherwise they assume it’s master), I created this script to more quickly and more accurately ascertain this information.

About

🌳  What’s in a name? It doesn’t matter. Find the name of a Git repository’s default branch with a POSIX-compliant shell script.

License:Other


Languages

Language:Shell 100.0%