PHP Classes
elePHPant
Icontem

PHP Git Library Provider: Manipulate Git repositories using the git command

Recommend this page to a friend!
  Info   View files Example   View files View files (18)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-05-18 (3 years ago) RSS 2.0 feedNot enough user ratingsTotal: 137 All time: 8,823 This week: 390Up
Version License PHP version Categories
git-provider 0.2BSD License5.4PHP 5, Files and Folders, Project Man...
Description Author

This class is a wrapper around the git command to manipulate Git repositories.

It can execute the git command to execute several types of operations with Git repositories. Currently it can:

- Create a repository
- Set the repository name and author
- Check if repository files are staged
- Commit changed files
- Remove files from the repository
- Clone repository from given URL
- Check if a repository is empty
- Check if a branch name exists
- Push changes to the origin repository
- Pull changes from an origin repository
- Create branch
- Checkout branch

  Performance   Level  
Name: Maik Greubel <contact>
Classes: 10 packages by
Country: Germany Germany
Age: ???
All time rank: 118475 in Germany Germany
Week rank: 158 Up3 in Germany Germany Up
Innovation award
Innovation award
Nominee: 4x

Details

Build Status Coverage Status

phpGitProvider

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", "john@doe.tld");
// 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 folder image Files  
File Role Description
Files folder imagecontrib (2 files)
Files folder imageexample (2 files)
Files folder imagesrc (2 files)
Files folder imagetests (1 directory)
Accessible without login Plain text file .gitignore Data git ignore configuration
Accessible without login Plain text file .travis.yml Data Travis Ci configuration
Accessible without login Plain text file build.xml Data Ant build script
Accessible without login Plain text file composer.json Data Composer control file
Accessible without login Plain text file LICENSE Lic. License
Accessible without login Plain text file phpcs.xml Data PHP Codesniffer configuration
Accessible without login Plain text file phpdox.xml Data phpdox configuration
Accessible without login Plain text file phpmd.xml Data PHP Messdetection configuration
Accessible without login Plain text file phpunit.xml Data PHPUnit configuration
Accessible without login Plain text file README.md Data Readme

  Files folder image Files  /  contrib  
File Role Description
  Accessible without login Plain text file phpcs.xsd Data Contributed schema for code sniffer configuration
  Accessible without login Plain text file phpunit.xsd Data Contributed schema for phpunit configuration

  Files folder image Files  /  example  
File Role Description
  Accessible without login Plain text file .gitignore Data git ignore
  Accessible without login Plain text file basic-example.php Example Basic example

  Files folder image Files  /  src  
File Role Description
  Accessible without login Plain text file GitProvider.php Class The main class
  Accessible without login Plain text file GitProviderException.php Class Derived exception

  Files folder image Files  /  tests  
File Role Description
Files folder imageprovider-tests (2 files)

  Files folder image Files  /  tests  /  provider-tests  
File Role Description
  Accessible without login Plain text file FailureTest.php Test Unit test
  Accessible without login Plain text file GitProviderTest.php Test Unit test

Downloadgit-provider-2015-05-18.zip 15KB
Downloadgit-provider-2015-05-18.tar.gz 11KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
PHP Generics Download .zip .tar.gz Several general purpose classes such as Directory and logging exists already there Required
 Version Control Unique User Downloads Download Rankings  
 100%
Total:137
This week:0
All time:8,823
This week:390Up