# gitconfiglocal

> parse the .git/config file into a useful data structure

Latest version **2.1.0** (published 2019-02-15) · BSD license · 0 weekly downloads

## Install

```sh
npm install gitconfiglocal
pnpm add gitconfiglocal
yarn add gitconfiglocal
bun add gitconfiglocal
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2019-02-15 |
| First published | 2013-04-23 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | separate (@types/gitconfiglocal) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Ryan Day |
| Maintainers | soldair |
| Keywords | git, config |

## Links

- npm: https://www.npmjs.com/package/gitconfiglocal
- Repository: https://github.com/soldair/node-gitconfiglocal
- Homepage: https://github.com/soldair/node-gitconfiglocal#readme
- Issues: https://github.com/soldair/node-gitconfiglocal/issues
- npm.io page: https://npm.io/package/gitconfiglocal

## Dependencies (1)

- [ini](https://npm.io/package/ini.md) ^1.3.2

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2019-02-15
- 2.0.2 — 2018-08-01
- 2.0.1 — 2016-01-23
- 1.0.0 — 2015-08-22
- 0.0.3 — 2015-02-04
- 0.0.2 — 2014-12-05
- 0.0.1 — 2014-01-31
- 0.0.0 — 2013-04-23

## README

[![Build Status](https://travis-ci.org/soldair/node-gitconfiglocal.svg?branch=master)](https://travis-ci.org/soldair/node-gitconfiglocal)

gitconfiglocal
==============

parse the `.git/config` file into a useful data structure


example
=======

- search config in $GIT_DIR (.git by default)
```js
var gitconfig = require('gitconfiglocal');

gitconfig('./',function(err,config){
  console.log(config);
  /* prints:
  { core:
     { repositoryformatversion: '0',
       filemode: true,
       bare: false,
       logallrefupdates: true },
    remote:
     { origin:
        { url: 'git@github.com:soldair/node-gitconfiglocal.git',
          fetch: '+refs/heads/*:refs/remotes/origin/*' } } }
  */
});

```

- specify $GIT_DIR via options:
```js
gitconfig('./', { gitDir: 'path/to/gitdir' }, cb);

```

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