|Teknikode dbd8c07348 Initial Commit of Teknik Source||6 years ago|
|lib/Gitter||6 years ago|
|tests/Gitter/Tests||6 years ago|
|.gitignore||6 years ago|
|.travis.yml||6 years ago|
|LICENSE||6 years ago|
|README.md||6 years ago|
|composer.json||6 years ago|
|composer.lock||6 years ago|
|phpunit.xml.dist||6 years ago|
Gitter allows you to interact in an object oriented manner with Git repositories
via PHP. The main goal of the library is not to replace the system
but provide a coherent, stable and performatic object oriented interface.
Most commands are sent to the system’s
git command, parsed and then interpreted
by Gitter. Everything is transparent to you, so you don’t have to worry about a thing.
Gitter is very easy to use and you’ll just need a few method calls to get started. For example, to create a new repository:
$client = new Gitter\Client; $repository = $client->createRepository('/home/user/test');
Or a bare repository:
$client = new Gitter\Client; $repository = $client->createRepository('/home/user/test', true);
Or to open an existing repository:
$client = new Gitter\Client; $repository = $client->getRepository('/home/user/anothertest');
Both methods will return a
Repository object, which has various methods
that allow you to interact with that repository.
Once you get hold of the
Repository object, you can use:
$commits = $repository->getCommits(); print_r($commits);
To get a list of various commits.
Given a specific commit hash, you can find information about that commit:
$commit = $repository->getCommit('920be98a05'); print_r($commit);