| Recommend this page to a friend! | 
|  Download | 
| Info | Example |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2025-05-08 (11 hours ago)  |     64% | Total: 148 | All time:  9,113 This week: 40  | |||||
| Version | License | PHP version | Categories | |||
| git-provider 0.12 | BSD License | 5.4 | PHP 5, Files and Folders, Project Man... | 
| Description | Author | |
| This class is a wrapper around the git command to manipulate Git repositories. | 
| 
<?php | 
This package provides an easy to use git client class for PHP. Here a small example to show the features:
$path = "/path/to/where/you/want/to/work/on/your/repo";
$provider = new GitProvider($path);
// Create a shared bare repository
$provider->create(true, true);
// Set the author of the repo
$provider->setAuthor("John Doe", "[email protected]");
// Provide a project name
$provider->setProjectName('A test repository');
// Some data to repository (file must exist)
$provider->addToIndex("README.md");
// Commit your changes with a speaking message
$provider->commit("Added README");
|  Files (18) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  contrib (2 files) | ||||
|  example (2 files) | ||||
|  src (2 files) | ||||
|  tests (1 directory) | ||||
|    .gitignore | Data | git ignore configuration | ||
|    .travis.yml | Data | Travis Ci configuration | ||
|    build.xml | Data | Ant build script | ||
|    composer.json | Data | Composer control file | ||
|    LICENSE | Lic. | License | ||
|    phpcs.xml | Data | PHP Codesniffer configuration | ||
|    phpdox.xml | Data | phpdox configuration | ||
|    phpmd.xml | Data | PHP Messdetection configuration | ||
|    phpunit.xml | Data | PHPUnit configuration | ||
|    README.md | Data | Readme | ||
|  Files (18) | / | contrib | 
| File | Role | Description | 
|---|---|---|
|    phpcs.xsd | Data | Contributed schema for code sniffer configuration | 
|    phpunit.xsd | Data | Contributed schema for phpunit configuration | 
|  Files (18) | / | example | 
| File | Role | Description | 
|---|---|---|
|    .gitignore | Data | git ignore | 
|    basic-example.php | Example | Basic example | 
|  Files (18) | / | src | 
| File | Role | Description | 
|---|---|---|
|    GitProvider.php | Class | The main class | 
|    GitProviderException.php | Class | Derived exception | 
|  Files (18) | / | tests | / | provider-tests | 
| File | Role | Description | 
|---|---|---|
|    FailureTest.php | Test | Unit test | 
|    GitProviderTest.php | Test | Unit test | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
|  | git-provider-2025-05-08.zip 15KB | 
|  | git-provider-2025-05-08.tar.gz 11KB | 
|  | Install with Composer | 
| Needed packages | ||
| Class | Download | Why it is needed | Dependency | 
|---|---|---|---|
| PHP Generics |  .zip  .tar.gz | Several general purpose classes such as Directory and logging exists already there | Required | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| User Ratings | ||||||||||||||||||||||||||||||
| 
 | ||||||||||||||||||||||||||||||
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.
| Related pages | 
| Dynamic generated API documentation | 
| Unit test code coverage statistics |