Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrishalbert/git
Php wrapper for git.
https://github.com/chrishalbert/git
Last synced: about 2 months ago
JSON representation
Php wrapper for git.
- Host: GitHub
- URL: https://github.com/chrishalbert/git
- Owner: chrishalbert
- License: bsd-3-clause
- Created: 2016-10-30T21:14:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-17T03:12:14.000Z (almost 8 years ago)
- Last Synced: 2024-09-26T09:28:54.231Z (3 months ago)
- Language: PHP
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git
[![Build Status](https://travis-ci.org/chrishalbert/Git.svg?branch=master)](https://travis-ci.org/chrishalbert/Git)
[![Coverage Status](https://coveralls.io/repos/github/chrishalbert/Git/badge.svg?branch=master)](https://coveralls.io/github/chrishalbert/Git?branch=master)
[![Latest Stable Version](https://poser.pugx.org/chrishalbert/git/version)](https://packagist.org/packages/chrishalbert/git)
[![License](https://poser.pugx.org/chrishalbert/git/license)](https://packagist.org/packages/chrishalbert/git)## Overview
This is a simple git wrapper created for use in other php libraries.It uses magic methods to execute commands, however it is extendable.
## Installation
Add this to your composer file:
```
{
"require": {
"chrishalbert/git": "1.*"
}
}
```Or simply on the command line:
```
composer require chrishalbert/git
```## Usage
```php
$git = new Git();
$branches = $git->branch();// Fix a file for all branches
foreach ($branches as $branch) {
$git->checkout($branch);
// Do stuff
$git->add('.');
$git->commit(['--message' => 'Fixed a bug']);
}$git->checkout('master');
```