Simple PHP wrapper for the Git command
To open an existing repository
use \PhpGit\Git;
use \PhpProc\Process;
$git = new Git('/usr/bin/git', new Process());
$repository = $git->open('./php-git');
To clone a remote repository
use \PhpGit\Git;
use \PhpProc\Process;
$git = new Git('/usr/bin/git', new Process());
$repository = $git->clone('https://github.com/lshepstone/php-git.git', './php-git');
To pull from the default remote repository
use \PhpGit\Git;
use \PhpProc\Process;
$git = new Git('/usr/bin/git', new Process());
$git->pull('./php-git');
// or, using an already opened Repository instance
$repository = $git->open('./php-git');
$repository->pull();