git-default-branch

1.0.0 • Public • Published

git-default-branch

Returns Git default branch name (usually main or master).

Installation

npm install git-default-branch

Usage

const gitDefaultBranch = require('git-default-branch');
 
console.log(gitDefaultBranch());
// -> main

Changelog

The changelog can be found on the Releases page.

Contributing

Everyone is welcome to contribute. Please take a moment to review the contributing guidelines.

Authors and license

Artem Sapegin and contributors.

MIT License, see the included License.md file.

Package Sidebar

Install

npm i git-default-branch

Weekly Downloads

2,733

Version

1.0.0

License

MIT

Unpacked Size

3.88 kB

Total Files

4

Last publish

Collaborators

  • sapegin