PHPackages                             stikman/php-git-version-tool - 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. stikman/php-git-version-tool

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

stikman/php-git-version-tool
============================

Class that makes managing local git repos and syncing with remote repos easy. Good utility class for cli tools that rely on semver tagging for deployment

0.1.1(10y ago)010MITPHPPHP &gt;=5.3.0

Since Nov 20Pushed 10y ago1 watchersCompare

[ Source](https://github.com/stikmanw/php-git-version-tool)[ Packagist](https://packagist.org/packages/stikman/php-git-version-tool)[ RSS](/packages/stikman-php-git-version-tool/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (3)Used By (0)

PHP-Git-Version-Tool
====================

[](#php-git-version-tool)

This class helps deal with remote repos and local repos you want to sync up. It handles tagged releases specifically allowing you to push up tagged version releases to a central repository. In my case I built it because I had a centralized shared private repo of code that multiple other engineers would need to push their tagged version of code into.

\####Enjoy! I hope it helps others out!

> **Note:**The server running commands will need to have git ssh permissions or use the credentials in the path to make the http request. If you are having issues post an issue and I will try to help.

**Override location of git binary**(it assumes the binary */usr/bin/git*)

```
$git = new GitWrapper();
$git->setGit('/usr/local/bin/git');

```

**Add a remote directory to contain new code**

```
$git = new GitWrapper();
$git->add("/local/instance/of/package/registry",{$module->name}/{$module->version}/");
$git->commitAndPush(
    "/local/instance/of/package/registry",  // local instance of shared registry
    "{$module->name}/{$module->version}/",   // make changes and push to remote
    "{$module->name} was registered systematically" // message for commit
);

```

**Fetch a specific version of a remote repo and clone it somewhere local**More specific version of how to use wrapper

```
function getVersion($path, $remoteUrl, $version = 'master') {
    $git = new GitWrapper();
    $git->cloneRemoteNoCheckout($path, $remoteUrl);

    if($version !== 'master ) {
       $ref = $git->getTagRef($path, $version);
    }

    $git->checkoutRef($path, $ref);
}

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

3877d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/975346cf0dcc6361345bf8650d5da63b816d44b4f9e7bfa264ff8cac6c17acd1?d=identicon)[bdcarter42](/maintainers/bdcarter42)

---

Top Contributors

[![rv-bcarter](https://avatars.githubusercontent.com/u/34041945?v=4)](https://github.com/rv-bcarter "rv-bcarter (9 commits)")

### Embed Badge

![Health badge](/badges/stikman-php-git-version-tool/health.svg)

```
[![Health](https://phpackages.com/badges/stikman-php-git-version-tool/health.svg)](https://phpackages.com/packages/stikman-php-git-version-tool)
```

###  Alternatives

[bootflat/bootflat

An open source Flat UI KIT based on Bootstrap (3.3.0). A faster, easier and less repetitive way for web developers to create elegant web apps.

4.2k3.3k](/packages/bootflat-bootflat)[goalgorilla/social_template

Social project template for composer based Open Social projects.

3545.0k](/packages/goalgorilla-social-template)[motomedialab/simple-laravel-audit

A simple audit helper that integrates directly with Laravel &amp; FilamentPHP

264.1k](/packages/motomedialab-simple-laravel-audit)[luchavez/boilerplate-generator

A boilerplate generator for building packages and implementing DDD on Laravel 8|9|10.

111.7k2](/packages/luchavez-boilerplate-generator)

PHPackages © 2026

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