UNPKG

git-default-branch

Version:
33 lines (19 loc) 727 B
# git-default-branch Returns Git default branch name (usually `main` or `master`). ## Installation ``` npm install git-default-branch ``` ## Usage ```js const gitDefaultBranch = require('git-default-branch'); console.log(gitDefaultBranch()); // -> main ``` ## Changelog The changelog can be found on the [Releases page](https://github.com/sapegin/git-default-branch/releases). ## Contributing Everyone is welcome to contribute. Please take a moment to review the [contributing guidelines](Contributing.md). ## Authors and license [Artem Sapegin](https://sapegin.me) and [contributors](https://github.com/sapegin/git-default-branch/graphs/contributors). MIT License, see the included [License.md](License.md) file.