ichhabrecht / git-wrapper
PHP (只读) 对 Git 命令行工具的封装
1.3.0
2017-03-12 15:33 UTC
Requires
- symfony/process: ^3.0
Requires (Dev)
- phpunit/phpunit: ~4.8.0
- symfony/filesystem: ^3.0
Suggests
- friendsofphp/php-cs-fixer: Tool to automatically fix PHP coding standards issues
This package is auto-updated.
Last update: 2024-09-11 14:11:01 UTC
README
PHP (只读) 对 Git 命令行工具的封装。
安装
建议您使用 Composer 安装 git-wrapper。
$ composer require ichhabrecht/git-wrapper
使用
克隆仓库
$gitWrapper = new IchHabRecht\GitWrapper\GitWrapper(); $gitRepository = $gitWrapper->cloneRepository('https://github.com/IchHabRecht/git-wrapper.git', __DIR__ . '/git-wrapper');
获取工作副本
$gitWrapper = new IchHabRecht\GitWrapper\GitWrapper(); $gitRepository = $gitWrapper->getRepository(__DIR__ . '/git-wrapper'); $gitRepository->fetch(); $gitRepository->pull();