Skip to content

Instantly share code, notes, and snippets.

@alexandresalome
Created September 24, 2012 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexandresalome/3778703 to your computer and use it in GitHub Desktop.
Save alexandresalome/3778703 to your computer and use it in GitHub Desktop.
gitlib sample
<?php require_once __DIR__.'/vendor/autoload.php';
/** gitlib: http://gitonomy.com/doc/gitlib/master/ */
$repo = Gitonomy\Git\Admin::init('/tmp/test', false);
$repo->run('remote', array('add', 'origin', 'https://github.com/gitonomy/gitlib.git'));
$repo->run('fetch', array('--all'));
$wc = $repo->getWorkingCopy();
$wc->checkout('master');
@alexandresalome
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment