PHPackages                             chrishalbert/git - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. chrishalbert/git

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

chrishalbert/git
================

A git wrapper.

1.0.2(9y ago)17.9k11BSD3-clausePHPPHP ^5.6 || ^7.0

Since Nov 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/chrishalbert/Git)[ Packagist](https://packagist.org/packages/chrishalbert/git)[ RSS](/packages/chrishalbert-git/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (5)Versions (6)Used By (1)

Git
===

[](#git)

[![Build Status](https://camo.githubusercontent.com/836829486573350b0f7d7ce26211cb2e564ea5701df8104480466d41790a1f15/68747470733a2f2f7472617669732d63692e6f72672f636872697368616c626572742f4769742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/chrishalbert/Git)[![Coverage Status](https://camo.githubusercontent.com/f777526db1b4fa0fc11d57f494cd512a441378e2df3e0b088296bc4b698b30e8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f636872697368616c626572742f4769742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/chrishalbert/Git?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/79712b90790115abe5f0a5829eac8887e0bc6a8c9fcf3533b218aa1d462e88a7/68747470733a2f2f706f7365722e707567782e6f72672f636872697368616c626572742f6769742f76657273696f6e)](https://packagist.org/packages/chrishalbert/git)[![License](https://camo.githubusercontent.com/2a4e088aafb0e667d034f8bd941f42d261dd44c7ac34d8561d9b896a4f05b819/68747470733a2f2f706f7365722e707567782e6f72672f636872697368616c626572742f6769742f6c6963656e7365)](https://packagist.org/packages/chrishalbert/git)

Overview
--------

[](#overview)

This is a simple git wrapper created for use in other php libraries.

It uses magic methods to execute commands, however it is extendable.

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

[](#installation)

Add this to your composer file:

```
{
    "require": {
        "chrishalbert/git": "1.*"
    }
}

```

Or simply on the command line:

```
composer require chrishalbert/git

```

Usage
-----

[](#usage)

```
$git = new Git();
$branches = $git->branch();

// Fix a file for all branches
foreach ($branches as $branch) {
    $git->checkout($branch);
    // Do stuff
    $git->add('.');
    $git->commit(['--message' => 'Fixed a bug']);
}

$git->checkout('master');
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% 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 ~24 days

Total

5

Last Release

3375d ago

Major Versions

0.1.1 → 1.0.02016-11-12

PHP version history (2 changes)0.1.0PHP 5.6.\*

v1.0.1PHP ^5.6 || ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a36d01e69089e5e2e2eceb931f79daf20d7a565a0903541edf949479c9ae471?d=identicon)[chrishalbert](/maintainers/chrishalbert)

---

Top Contributors

[![chrishalbert](https://avatars.githubusercontent.com/u/16158060?v=4)](https://github.com/chrishalbert "chrishalbert (22 commits)")[![chadicus](https://avatars.githubusercontent.com/u/1182337?v=4)](https://github.com/chadicus "chadicus (2 commits)")

---

Tags

phpgit

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[marcocesarato/php-conventional-changelog

Generate changelogs and release notes from a project's commit messages and metadata and automate versioning with semver.org and conventionalcommits.org

2511.3M109](/packages/marcocesarato-php-conventional-changelog)[wcm/git-php-hooks

Write git hooks with PHP, organize them on a per-project base and automatically add them

6441.1k3](/packages/wcm-git-php-hooks)[nilportugues/php_backslasher

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

889.3k18](/packages/nilportugues-php-backslasher)[wcm/git-php-hooks-library

A collection of Git PHP Hooks

1210.1k3](/packages/wcm-git-php-hooks-library)[nilportugues/php_todo

Looks into the code using a user-defined list of to-do phrases and stops commit if the total amount increased or is above a threshold.

1210.0k](/packages/nilportugues-php-todo)

PHPackages © 2026

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