A git wrapper.

1.0.2 2017-02-17 03:04 UTC

This package is auto-updated.

Last update: 2024-04-19 09:24:26 UTC


README

Build Status Coverage Status Latest Stable Version License

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

$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');