aurimasniekis / git-config
Git Config value provider
1.0.0
2017-03-24 15:22 UTC
Requires
- php: >=7.1
Requires (Dev)
- php-mock/php-mock-phpunit: ^2.0
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-11-14 02:58:38 UTC
README
Provides interface for git config
.
Install
Via Composer
$ composer require aurimasniekis/git-config
Usage
Initialization:
// 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
$config->get('user.name')
Set value
$config->get('user.name', 'Foo Bar')
Unset value
$config->unSet('user.name')
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
License
Please see License File for more information.