Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aurimasniekis/git-config
Provides interface for git config.
https://github.com/aurimasniekis/git-config
Last synced: about 2 months ago
JSON representation
Provides interface for git config.
- Host: GitHub
- URL: https://github.com/aurimasniekis/git-config
- Owner: aurimasniekis
- License: mit
- Created: 2017-03-24T14:03:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-24T16:04:12.000Z (almost 8 years ago)
- Last Synced: 2024-04-29T08:03:04.213Z (9 months ago)
- Language: PHP
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# GitConfig Component
[![Latest Version](https://img.shields.io/github/release/Aurimasniekis/git-config.svg?style=flat-square)](https://github.com/aurimasniekis/git-config/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Build Status](https://img.shields.io/travis/aurimasniekis/git-config.svg?style=flat-square)](https://travis-ci.org/aurimasniekis/git-config)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/aurimasniekis/git-config.svg?style=flat-square)](https://scrutinizer-ci.com/g/aurimasniekis/git-config)
[![Quality Score](https://img.shields.io/scrutinizer/g/aurimasniekis/git-config.svg?style=flat-square)](https://scrutinizer-ci.com/g/aurimasniekis/git-config)
[![Total Downloads](https://img.shields.io/packagist/dt/aurimasniekis/git-config.svg?style=flat-square)](https://packagist.org/packages/aurimasniekis/git-config)[![Email](https://img.shields.io/badge/[email protected]?style=flat-square)](mailto:[email protected])
Provides interface for `git config`.
## Install
Via Composer
```bash
$ composer require aurimasniekis/git-config
```## Usage
Initialization:
```php
// Uses `git` from $PATH and standard `.gitconfig` files
$config = new Config();// Uses custom `git` path
$config = new Config('/usr/local/bin/git');// Uses custom `.gitconfig` file
$config = new Config(null, '~/.gitconfig');
```Get value
```php
$config->get('user.name')
```Set value
```php
$config->get('user.name', 'Foo Bar')
```Unset value
```php
$config->unSet('user.name')
```## Testing
```bash
$ composer test
```## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
## License
Please see [License File](LICENSE) for more information.