chrishalbert / git
一个git包装器。
1.0.2
2017-02-17 03:04 UTC
Requires
- php: ^5.6 || ^7.0
Requires (Dev)
- chadicus/coding-standard: ~1.0
- phing/phing: 2.*
- phpunit/phpunit: 4.*
- satooshi/php-coveralls: 1.*
- squizlabs/php_codesniffer: 2.*
README
概述
这是一个为在其他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');