PHP code example of aurimasniekis / git-config

1. Go to this page and download the library: Download aurimasniekis/git-config library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aurimasniekis / git-config example snippets


// 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')