Run git config command
npm install gitconfiggitconfig
==========
[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]
[bd_repo_url]: https://github.com/okunishinishi/node-gitconfig
[bd_travis_url]: http://travis-ci.org/okunishinishi/node-gitconfig
[bd_travis_shield_url]: http://img.shields.io/travis/okunishinishi/node-gitconfig.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/okunishinishi/node-gitconfig
[bd_travis_com_shield_url]: https://api.travis-ci.com/okunishinishi/node-gitconfig.svg?token=
[bd_license_url]: https://github.com/okunishinishi/node-gitconfig/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/okunishinishi/node-gitconfig
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/okunishinishi/node-gitconfig.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/okunishinishi/node-gitconfig.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/okunishinishi/node-gitconfig
[bd_gemnasium_shield_url]: https://gemnasium.com/okunishinishi/node-gitconfig.svg
[bd_npm_url]: http://www.npmjs.org/package/gitconfig
[bd_npm_shield_url]: http://img.shields.io/npm/v/gitconfig.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
Run git config command
Installation
-----
``bash`
npm install gitconfig --save
Usage
---------
`javascript
'use strict'
const gitconfig = require('gitconfig')
// Set git config values.
gitconfig.set({
'user.mail': 'foo@example.com'
}, {
location: 'local'
}).then(() => {
/ ... /
})
// Unset git config values.
gitconfig.unset([ 'user.mail' ], {
location: 'local'
}).then(() => {
/ ... /
})
// Git all config values.
gitconfig.get({
location: 'global'
}).then((config) => {
/ ... /
})
``
API
---
| Signature | Description |
| --------- | ----------- |
| gitconfig.get(options, callback) | Get all git config. |
| gitconfig.get(key, options, callback) | Get config with key. |
| gitconfig.set(key, val, options, callback) | Set a config value. |
| gitconfig.set(values, options, callback) | Set mutliple config values. |
| gitconfig.unset(keys, options, callback) | Un set config value(s). |
Options
-------
| Name | Description |
| ---- | ----- |
| location | Config file location. (global, system, or local) |
License
-------
This software is released under the MIT License.
Links
------
+ [git-config][git_config_url]
[git_config_url]: https://git-scm.com/docs/git-config