Skip to content

Instantly share code, notes, and snippets.

@jcbwlkr
Created July 1, 2014 21:23
Show Gist options
  • Save jcbwlkr/2f7cd854799b9001411a to your computer and use it in GitHub Desktop.
Save jcbwlkr/2f7cd854799b9001411a to your computer and use it in GitHub Desktop.
PHP Git
{
"name": "jacobwalker0814/php-git",
"description": "Testing out PHPGit",
"require": {
"kzykhys/git": "dev-master"
},
"authors": [
{
"name": "Jacob Walker",
"email": "jwalker@tortugas-llc.com"
}
]
}
<?php
require __DIR__ . "/vendor/autoload.php";
$git = new \PHPGit\Git();
$git->setRepository("/home/jwalker/Projects/testServer");
print $git->log("HEAD")[0]["hash"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment