Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/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.
https://github.com/lucaslarson/git-default-branch
git-addons git-branches git-default-branch git-main-branch git-plugin hacktoberfest oh-my-zsh-plugin ohmyzsh-plugin posix-compatible posix-compliance posix-compliant zsh-plugin zsh-plugins
Last synced: 6 days ago
JSON representation
🌳  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.
- Host: GitHub
- URL: https://github.com/lucaslarson/git-default-branch
- Owner: LucasLarson
- License: other
- Created: 2021-04-15T22:46:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-24T12:12:49.000Z (7 months ago)
- Last Synced: 2024-05-02T05:58:33.463Z (7 months ago)
- Topics: git-addons, git-branches, git-default-branch, git-main-branch, git-plugin, hacktoberfest, oh-my-zsh-plugin, ohmyzsh-plugin, posix-compatible, posix-compliance, posix-compliant, zsh-plugin, zsh-plugins
- Language: Shell
- Homepage:
- Size: 73.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.adoc
- Changelog: changelog.md
- Funding: .github/funding.yml
- License: license.adoc
- Code of conduct: .github/code_of_conduct.md
- Codeowners: .github/codeowners
Awesome Lists containing this project
README
git default-branch
------------------🌳 What’s in a name? It doesn’t matter.
https://github.com/LucasLarson/git-default-branch/actions?query=workflow:Super-Linter[image:https://github.com/LucasLarson/git-default-branch/workflows/Super-Linter/badge.svg[GitHub
Super-Linter,title="GitHub Super-Linter status"]]
https://github.com/LucasLarson/git-default-branch/blob/main/license.adoc[image:https://img.shields.io/badge/license-AGPL_3+-blue[AGPL,title="GNU
Affero General Public License v3.0 or later"]]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.