Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A PHP git library
PHP
branch: master

added GitRepo::git_directory_path()

the new git_directory_path method returns the path to the ".git" directory in the case of a normal directory, or the repo path in the case of a bare repo.

also changed the get_description() and set_description() methods to use this new method.
latest commit dc05924625
@kbjr authored

readme.md

Git.php

Click here to lend your support to: Git.php and make a donation at pledgie.com !

Description

A PHP git repository control library. Allows the running of any git command from a PHP class. Runs git commands using proc_open, not exec or the type, therefore it can run in PHP safe mode.

Requirements

A system with git installed

Basic Use

require_once('Git.php');

$repo = Git::open('/path/to/repo');  // -or- Git::create('/path/to/repo')

$repo->add('.');
$repo->commit('Some commit message');
$repo->push('origin', 'master');
Something went wrong with that request. Please try again.