2017 © Pedro Peláez
 

library gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

image

klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

  • PHP
  • 9 Dependents
  • 0 Suggesters
  • 64 Forks
  • 5 Open issues
  • 10 Versions
  • 6 % Grown

The README.md

Gitter

Latest Stable Version License Build Status, (*1)

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 git command, but provide a coherent, stable and performatic object oriented interface., (*2)

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., (*3)

Requirements

  • git (http://git-scm.com) (tested with 1.7.5.4)

Authors and contributors

License

New BSD license, (*4)

Usage

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:, (*5)

$client = new Gitter\Client;
$repository = $client->createRepository('/home/user/test');

Or a bare repository:, (*6)

$client = new Gitter\Client;
$repository = $client->createRepository('/home/user/test', true);

Or to open an existing repository:, (*7)

$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., (*8)

Getting a list of commits

Once you get hold of the Repository object, you can use:, (*9)

$commits = $repository->getCommits();
print_r($commits);

To get a list of various commits., (*10)

Getting a single commit

Given a specific commit hash, you can find information about that commit:, (*11)

$commit = $repository->getCommit('920be98a05');
print_r($commit);

Getting statistics for repository

Statistics aggregators can be added to the repository:, (*12)

$repository->addStatistics(array(
    new Gitter\Statistics\Contributors,
    new Gitter\Statistics\Date,
    new Gitter\Statistics\Day,
    new Gitter\Statistics\Hour
));
print_r($repository->getStatistics());

The Versions

24/05 2014

0.3.0

0.3.0.0 https://github.com/klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

git vcs

01/06 2013

0.2.0

0.2.0.0 https://github.com/klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

git vcs

01/06 2013

dev-refactoring

dev-refactoring https://github.com/klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

git vcs

29/03 2013

0.1.4

0.1.4.0 https://github.com/klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

git vcs

29/03 2013

0.1.3

0.1.3.0 https://github.com/klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

git vcs

31/10 2012

0.1.2

0.1.2.0 https://github.com/klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

git vcs

19/09 2012

0.1.1

0.1.1.0 https://github.com/klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

git vcs

19/09 2012

0.1.0

0.1.0.0 https://github.com/klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

git vcs