Skip to content

Instantly share code, notes, and snippets.

@viniciusss
Created June 25, 2014 20:54
Show Gist options
  • Save viniciusss/f0822d64ca5465fc5605 to your computer and use it in GitHub Desktop.
Save viniciusss/f0822d64ca5465fc5605 to your computer and use it in GitHub Desktop.
git php windows
<?php
include 'lib/SplClassLoader.php' ;
$classLoader = new SplClassLoader ( 'Symfony' , 'lib' ) ;
$classLoader -> register () ;
$classLoader = new SplClassLoader ( 'PHPGit' , 'lib' ) ;
$classLoader -> register ();
$git = new PHPGit\Git();
$git->setRepository(__DIR__);
$git->config->set('user.email', '[email protected]');
$git->config->set('user.name', 'Teste');
$myGit = substr(`where git`, 0, -5);
$git->setBin($myGit);
var_dump($git->pull('origin', 'offline'));
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment