https://github.com/kbjr/Git.php
A PHP git library
https://github.com/kbjr/Git.php
Last synced: about 1 month ago
JSON representation
A PHP git library
- Host: GitHub
- URL: https://github.com/kbjr/Git.php
- Owner: kbjr
- License: other
- Created: 2010-07-21T07:58:37.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T03:26:31.000Z (about 2 years ago)
- Last Synced: 2025-04-12T11:02:40.081Z (about 1 month ago)
- Language: PHP
- Homepage:
- Size: 79.1 KB
- Stars: 774
- Watchers: 63
- Forks: 239
- Open Issues: 18
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license.txt
Awesome Lists containing this project
- awesome-github-repos - kbjr/Git.php - A PHP git library (PHP)
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?
[](https://ko-fi.com/U7U8MIC8)