2017 © Pedro Peláez
 

library git-api

A PHP API to get infos and manage a GIT distant or local repository

image

atelierspierrot/git-api

A PHP API to get infos and manage a GIT distant or local repository

  • Saturday, January 2, 2016
  • by picas
  • Repository
  • 1 Watchers
  • 3 Stars
  • 209 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

GIT API

demonstration documentation A PHP API to get infos and manage a GIT distant or local repository., (*1)

Usage

Working with a local repository clone:, (*2)

// open a repo
$local_repo = ~/repositories/git-api
$repo = \GitApi\GitApi::open($local_repo)

// commiters list
$repo->getCommitersList()

// branches list
$repo->getBranchesList()

// commits list
$repo->getCommitsList()

// current branch
$repo->getCurrentBranch()

// description
$repo->getDescription()

// tags list
$repo->getTagsList()

// last commit infos
$repo->getLastCommitInfos()

// tree
$repo->getTree()

// tree for first dir
$repo->getTree('HEAD', $first_dir)

// files info
$repo->getFilesInfo()

// recursive tree
$repo->getRecursiveTree()

// commits history
$repo->getCommitsHistory()

Working with a distant repository URL will create a local clone:, (*3)

// create a clone of a distant repo in a local dir
// if the local clone already exists, a `git pull` will be processed on it
$distant_repo = https://github.com/atelierspierrot/git-api
$local_repo = ~/repositories/git-api
$repo = \GitApi\GitApi::create($local_repo, $distant_repo)

// ... same as above

Installation

For a complete information about how to install this package and load its namespace, please have a look at our USAGE documentation., (*4)

If you are a Composer user, just add the package to the requirements of your project's composer.json manifest file:, (*5)

"atelierspierrot/git-api": "@stable"

You can use a specific release or the latest release of a major version using the appropriate version constraint., (*6)

Please note that this package depends on the externals PHP Patterns and PHP Library., (*7)

Author & License

GIT API, (*8)

http://github.com/atelierspierrot/git-api, (*9)

Copyright (c) 2013-2016 Pierre Cassat and contributors, (*10)

Licensed under the Apache 2.0 license., (*11)

http://www.apache.org/licenses/LICENSE-2.0, (*12)


Les Ateliers Pierrot - Paris, France, (*13)

http://www.ateliers-pierrot.fr/ - contact@ateliers-pierrot.fr, (*14)

The Versions

02/01 2016

dev-master

9999999-dev http://github.com/atelierspierrot/git-api

A PHP API to get infos and manage a GIT distant or local repository

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

git vcs

02/01 2016

dev-dev

dev-dev http://github.com/atelierspierrot/git-api

A PHP API to get infos and manage a GIT distant or local repository

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

git vcs

04/03 2015

v1.1.0

1.1.0.0 http://github.com/atelierspierrot/git-api

A PHP API to get infos and manage a GIT distant or local repository

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

git vcs

22/06 2014

v1.0.3

1.0.3.0 http://github.com/atelierspierrot/git-api

A PHP API to get infos and manage a GIT distant or local repository

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

git vcs

16/10 2013

v1.0.2

1.0.2.0 http://github.com/atelierspierrot/git-api

A PHP API to get infos and manage a GIT distant or local repository

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

git vcs

22/09 2013

1.0.1

1.0.1.0 http://github.com/atelierspierrot/git-api

A PHP API to get infos and manage a GIT distant or local repository

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

git vcs