Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kbjr/Git.php

A PHP git library
https://github.com/kbjr/Git.php

Last synced: 3 months ago
JSON representation

A PHP git library

Awesome Lists containing this project

README

        

# 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](http://git-scm.com/) installed

## Basic Use

```php
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](https://www.ko-fi.com/img/donate_sm.png)](https://ko-fi.com/U7U8MIC8)