PHP обертка для GIT

use GitWrapper\\GitWrapper;

// Initialize the library. If the path to the Git binary is not passed as
// the first argument when instantiating GitWrapper, it is auto-discovered.
require_once 'vendor/autoload.php';
$wrapper = new GitWrapper();

// Optionally specify a private key other than one of the defaults.

// Clone a repo into `/path/to/working/copy`, get a working copy object.
$git = $wrapper->clone('git://', '/path/to/working/copy');

// Create a file in the working copy.

// Add it, commit it, and push the change.
->commit('Added the test.txt file as per the examples.')

// Render the output.
print $git->getOutput();

// Stream output of subsequent Git commands in real time to STDOUT and STDERR.

// Execute an arbitrary git command.
// The following is synonymous with `git config -l`
$wrapper->git('config -l');

Оставить комментарий

Ваш электронный адрес не будет опубликован. Обязательные поля помечены *