$ npm install git-default-branch
Returns Git default branch name (usually main or master).
npm install git-default-branch
const gitDefaultBranch = require('git-default-branch');
console.log(gitDefaultBranch());
// -> main
The changelog can be found on the Releases page.
Everyone is welcome to contribute. Please take a moment to review the contributing guidelines.
Artem Sapegin and contributors.
MIT License, see the included License.md file.
© 2010 - cnpmjs.org x YWFE | Home | YWFE