# git-default-branch

> Returns Git default branch name

Latest version **1.0.0** (published 2020-11-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-default-branch
pnpm add git-default-branch
yarn add git-default-branch
bun add git-default-branch
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-11-12 |
| First published | 2020-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Artem Sapegin |
| Maintainers | sapegin |
| Keywords | git, branch, default, master, main, name |

## Links

- npm: https://www.npmjs.com/package/git-default-branch
- Repository: https://github.com/sapegin/git-default-branch
- Issues: https://github.com/sapegin/git-default-branch/issues
- npm.io page: https://npm.io/package/git-default-branch

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-11-12

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

---
_Source: https://npm.io/package/git-default-branch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
