aurimasniekis / git-config
Git 配置值提供者
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-09-14 02:38:07 UTC
README
为 git config
提供接口。
安装
通过 Composer
$ composer require aurimasniekis/git-config
使用方法
初始化
// 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');
获取值
$config->get('user.name')
设置值
$config->get('user.name', 'Foo Bar')
取消设置值
$config->unSet('user.name')
测试
$ composer test
贡献
请参阅 CONTRIBUTING 和 CONDUCT 以获取详细信息。
许可证
有关更多信息,请参阅 许可证文件。