aurimasniekis/git-config

Git Config value provider

1.0.0 2017-03-24 15:22 UTC

This package is auto-updated.

Last update: 2024-10-14 02:47:25 UTC


README

Latest Version Software License Build Status Code Coverage Quality Score Total Downloads

Email

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.