Skip to content

Latest commit

 

History

History
30 lines (17 loc) · 646 Bytes

readme.md

File metadata and controls

30 lines (17 loc) · 646 Bytes

Git.php

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 __DIR__ . '/../vendor/autoload.php';

use Kbjr\Git\Git;

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

$repo->add('.');
$repo->commit('Some commit message');
$repo->push('origin', 'master');

Like my work?

ko-fi