grynn / git
A simple wrapper for git (depends on the git executable). Supports subset of commands useful for versioning projects
v0.0.3
2015-01-26 01:09 UTC
Requires
- php: >=5.3.3
- psr/log: ~1.0
Requires (Dev)
- jakub-onderka/php-parallel-lint: dev-master
- league/climate: dev-master
- pwfisher/command-line-php: dev-master#ce756a94efa3544b56d03a02d3634a8d969ee962
This package is not auto-updated.
Last update: 2025-02-15 18:44:10 UTC
README
Simple PHP wrapper for Git (depends on git executable being in the path). Very limited feature set. Mainly for use with Grynn\GitVersionBump
Installation
To add this package as a local, per-project dependency to your project, simply add a dependency on grynn/git
to your project's composer.json
file. Here is a minimal example of a composer.json
file that just defines a dependency on Grynn\Git 1.0:
{
"require": {
"grynn/git": "1.0.*"
}
}
Usage
$git = new \Grynn\Git();
$git->getCurrentBranch(); //Returns: branchname
$git->isDirty(); //Returns: true if working dir is dirty
$git->getVersionTag(); //Returns: version tag that describes current HEAD