Skip to content
/ Git Public

Simple PHP wrapper for Git, with a very limited feature set. Mainly for use with Grynn\GitVersionBump

License

Notifications You must be signed in to change notification settings

Grynn/Git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grynn\Git

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

About

Simple PHP wrapper for Git, with a very limited feature set. Mainly for use with Grynn\GitVersionBump

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages