PHP Classes


Recommend this page to a friend!
  Classes of Maik Greubel   PHP Git Library Provider   Download  
Role: Auxiliary data
Content type: text/markdown
Description: Readme
Class: PHP Git Library Provider
Manipulate Git repositories using the git command
Author: By
Last change: Update of
Date: 5 months ago
Size: 875 bytes


Class file image Download

Build Status Coverage Status


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)

// Commit your changes with a speaking message
$provider->commit("Added README");