An open API service indexing awesome lists of open source software.

https://github.com/sapegin/git-default-branch

Returns Git default branch name
https://github.com/sapegin/git-default-branch

Last synced: 3 months ago
JSON representation

Returns Git default branch name

Awesome Lists containing this project

README

          

# 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.