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
- Host: GitHub
- URL: https://github.com/sapegin/git-default-branch
- Owner: sapegin
- License: mit
- Created: 2020-11-12T07:41:31.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-09T09:06:38.000Z (about 3 years ago)
- Last Synced: 2025-02-01T08:03:54.809Z (11 months ago)
- Language: JavaScript
- Size: 1.4 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Contributing: Contributing.md
- License: License.md
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.