一个git包装器。

1.0.2 2017-02-17 03:04 UTC

This package is auto-updated.

Last update: 2024-09-19 10:23:26 UTC


README

Build Status Coverage Status Latest Stable Version License

概述

这是一个为在其他php库中使用而创建的简单git包装器。

它使用魔术方法来执行命令,但它是可以扩展的。

安装

将此添加到您的composer文件中

{
    "require": {
        "chrishalbert/git": "1.*"
    }
} 

或者在命令行中直接执行

composer require chrishalbert/git

用法

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