PHPackages                             graham-campbell/git-wrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. graham-campbell/git-wrapper

ActiveLibrary[CLI &amp; Console](/categories/cli)

graham-campbell/git-wrapper
===========================

A PHP wrapper around the Git command line utility.

v1.1.2(1y ago)44.0k1MITPHPPHP ^7.4.15 || ^8.0.2CI passing

Since Sep 4Pushed 1y agoCompare

[ Source](https://github.com/GrahamCampbell/git-wrapper)[ Packagist](https://packagist.org/packages/graham-campbell/git-wrapper)[ RSS](/packages/graham-campbell-git-wrapper/feed)WikiDiscussions 1.1 Synced 1w ago

READMEChangelog (8)Dependencies (6)Versions (12)Used By (0)

PHP Wrapper around GIT
======================

[](#php-wrapper-around-git)

This is a fork of [cpliakas/git-wrapper](https://github.com/cpliakas/git-wrapper) by [Chris Pliakas](https://github.com/cpliakas) and [Tomas Votruba](https://github.com/TomasVotruba). We **readable API that abstracts challenges of executing Git commands from within a PHP process** for you. We provide support for PHP 7.4, 8.0, 8.1, 8.2, 8.3 and 8.4, all in one version, without depending on Nette, a major difference from the upstream package!

- It's built upon the [`Symfony\Process`](https://symfony.com/doc/current/components/process.html) to execute the Git command with **cross-platform support** and uses the best-in-breed techniques available to PHP.
- This library also provides an SSH wrapper script and API method for developers to **easily specify a private key other than default** by using [the technique from StackOverflow](http://stackoverflow.com/a/3500308/870667).
- Finally, various commands are expected to be executed in the directory containing the working copy. **The library handles this transparently** so the developer doesn't have to think about it.

Installation
------------

[](#installation)

```
$ composer require "graham-campbell/git-wrapper:^1.1"
```

Usage
-----

[](#usage)

```
