PHPackages                             atelierspierrot/git-api - 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. atelierspierrot/git-api

AbandonedArchivedLibrary

atelierspierrot/git-api
=======================

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

v1.1.0(11y ago)3220GPL-3.0HTMLPHP &gt;=5.3.0

Since Sep 22Pushed 10y ago1 watchersCompare

[ Source](https://github.com/atelierspierrot/git-api)[ Packagist](https://packagist.org/packages/atelierspierrot/git-api)[ Docs](http://github.com/atelierspierrot/git-api)[ RSS](/packages/atelierspierrot-git-api/feed)WikiDiscussions dev Synced 2mo ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

GIT API
=======

[](#git-api)

[![demonstration](https://camo.githubusercontent.com/860c4e475d63ab920a51c3ea609b93e1a512859be6af45734514ca88d6fbc879/687474703a2f2f696d672e6174656c696572732d70696572726f742d7374617469632e66722f7365652d7468652d64656d6f2e737667)](http://sites.ateliers-pierrot.fr/git-api/)[![documentation](https://camo.githubusercontent.com/be7adb4ffdc11ba4b480fe936a1e0d23e2c6b3a70ffea72fa4004a30e74e1bae/687474703a2f2f696d672e6174656c696572732d70696572726f742d7374617469632e66722f726561642d7468652d646f632e737667)](http://docs.ateliers-pierrot.fr/git-api/)A PHP API to get infos and manage a [GIT](http://git-scm.com/) distant or local repository.

Usage
-----

[](#usage)

Working with a local repository clone:

```
// 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:

```
// 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
------------

[](#installation)

For a complete information about how to install this package and load its namespace, please have a look at [our *USAGE* documentation](http://github.com/atelierspierrot/atelierspierrot/blob/master/USAGE.md).

If you are a [Composer](http://getcomposer.org/) user, just add the package to the requirements of your project's `composer.json` manifest file:

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

You can use a specific release or the latest release of a major version using the appropriate [version constraint](http://getcomposer.org/doc/01-basic-usage.md#package-versions).

Please note that this package depends on the externals [PHP Patterns](http://github.com/atelierspierrot/patterns)and [PHP Library](http://github.com/atelierspierrot/library).

Author &amp; License
--------------------

[](#author--license)

> GIT API

>

> Copyright (c) 2013-2016 Pierre Cassat and contributors

> Licensed under the Apache 2.0 license.

>

> ---

> Les Ateliers Pierrot - Paris, France

>  -

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~176 days

Total

4

Last Release

4089d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bdcad88f9577d45da703864395c687480896a757e90978502b600d9dd588c247?d=identicon)[picas](/maintainers/picas)

---

Top Contributors

[![e-picas](https://avatars.githubusercontent.com/u/1021199?v=4)](https://github.com/e-picas "e-picas (52 commits)")

---

Tags

gitvcs

### Embed Badge

![Health badge](/badges/atelierspierrot-git-api/health.svg)

```
[![Health](https://phpackages.com/badges/atelierspierrot-git-api/health.svg)](https://phpackages.com/packages/atelierspierrot-git-api)
```

###  Alternatives

[klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

20032.4k5](/packages/klaussilveira-gitter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
