PHPackages                             spekulatius/gitpolicy - 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. spekulatius/gitpolicy

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

spekulatius/gitpolicy
=====================

Assists your developers and contributors with sensible git usage

0.1.4(6y ago)06[2 issues](https://github.com/spekulatius/GitPolicy/issues)BSD-3-ClausePHPPHP ^5.4.37CI failing

Since Apr 16Pushed 5y ago1 watchersCompare

[ Source](https://github.com/spekulatius/GitPolicy)[ Packagist](https://packagist.org/packages/spekulatius/gitpolicy)[ Docs](https://peterthaleikis.com)[ RSS](/packages/spekulatius-gitpolicy/feed)WikiDiscussions master Synced today

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

GitPolicy
=========

[](#gitpolicy)

[![Build Status](https://camo.githubusercontent.com/f158c82833f516d38ce1bc676b7a70e2df41b069a1552360fa4f53ba3393e6c0/68747470733a2f2f6170692e7472617669732d63692e6f72672f7370656b756c61746975732f476974506f6c6963792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/spekulatius/GitPolicy)[![Latest Stable Version](https://camo.githubusercontent.com/e98cb59126e9eeba556be8b7f04422e3a72187f57cfceb97baa42aa4fb6be7c3/68747470733a2f2f706f7365722e707567782e6f72672f7370656b756c61746975732f676974706f6c6963792f76657273696f6e2e737667)](https://github.com/spekulatius/gitpolicy/releases)[![Latest Unstable Version](https://camo.githubusercontent.com/ba50439ffa42bcf0c3764319fedcaa0a57f189e1412b9cc6993d2fe6bb44319a/68747470733a2f2f706f7365722e707567782e6f72672f7370656b756c61746975732f676974706f6c6963792f762f756e737461626c652e737667)](https://packagist.org/packages/spekulatius/gitpolicy)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f16d459cc8fadb0be92c367acb5ee808b27d76e77b06ff54b2cf5d038c62e9cc/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7370656b756c61746975732f676974706f6c6963792e737667)](https://scrutinizer-ci.com/g/spekulatius/gitpolicy?branch=master)[![Total Downloads](https://camo.githubusercontent.com/d06af8eb65d736fb1aada483ef4f1f32fbf58f82dbf67d93bd8fa1518e59487f/68747470733a2f2f706f7365722e707567782e6f72672f7370656b756c61746975732f676974706f6c6963792f646f776e6c6f6164732e737667)](https://packagist.org/packages/spekulatius/gitpolicy)[![License](https://camo.githubusercontent.com/222c8479323582c4efd401a52ba2b67ae34d66652acc31c8b861e265369931f3/68747470733a2f2f706f7365722e707567782e6f72672f7370656b756c61746975732f676974706f6c6963792f6c6963656e73652e737667)](https://github.com/spekulatius/gitpolicy/blob/master/license.md)

GitPolicy helps you and your development team to follow [guidelines for the usage of git](https://github.com/spekulatius/gitpolicy). These guidelines can include several options, see features.

*Beta state: This package is still in development. Please be careful and patient if you decide to use it.*

Features
--------

[](#features)

This is the set of features to make your life easier:

- Define rules to achieve your desired git usage.
- Forbidden actions (e.g. create new tag, push to master),
- Expectations for names of git tags and branches are possible.
- Support for common conventions like "begins with a ticket numbers" and semantic tags are possible.
- Simple to configure and install: One command to do install and initial set up. Configuration over one file: .gitpolicy.yml

Requirements
------------

[](#requirements)

This has been developed on a Debian destribution with Linux in mind. It should work on similar platforms. Mac OS: Maybe. Windows? No idea.

The only direct requirement is PHP 5.4.37.

Note: During the installation [Composer](https://getcomposer.org) will be installed and used to manage the dependencies of GitPolicy.

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

[](#installation)

The installation and set up are combined into one single command for you to run. It will take all of the steps to install, configurature, re-initalize or update GitPolicy. This is how it works:

1. Change into your project directory.
2. Check and run the following command in your project folder:

    ```
    # install or update composer - we need this to manage the dependencies
    curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer;

    # install the package as a global dependency and symlink it.
    composer global require spekulatius/gitpolicy;
    sudo ln -s ~/.composer/vendor/spekulatius/gitpolicy/gitpolicy /usr/local/bin/gitpolicy;

    # run the initial steps, this configures the git hook as well as copies the initial config file into your project.
    gitpolicy init;

    # commit the change
    git add composer.json composer.lock .gitpolicy.yml;
    git commit -m 'CHORE: Adding gitpolicy :sunny:'
    ```

Done 😎

Configuration
-------------

[](#configuration)

All configuration is done in one file: .gitpolicy.yml

With the initialization, an example is copied into your project :) All possible (sensible and non-sense) combinations of options have been listed. Please delete parts which aren't required for your project. By default there shouldn't be a strong policy in place.

Some .gitpolicy.yml examples:

- [default .gitpolicy.yml](https://github.com/spekulatius/gitpolicy/blob/master/templates/.gitpolicy.yml)
- [GitPolicy' own .gitpolicy.yml](https://github.com/spekulatius/gitpolicy/blob/master/.gitpolicy.yml)

More to come! If you want to share your .gitpolicy.yml as an example for a specific use case open a pull request ;)

[Roadmap and ideas](https://github.com/spekulatius/GitPolicy/issues)
--------------------------------------------------------------------

[](#roadmap-and-ideas)

Please see the issue tracker for planned enhancements and the roadmap.

- 0.1.x:
    - adding tests and bug fixes only
- 0.2.0:
    - [Providing the ability to manage the default commit message by populating sensible default values](https://github.com/spekulatius/GitPolicy/issues/5)
- 0.3.0:
    - [MAJOR: verification of commit messages](https://github.com/spekulatius/GitPolicy/issues/6)

License
-------

[](#license)

For information regarding the license see [license.md](https://github.com/spekulatius/GitPolicy/blob/master/license.md).

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

4

Last Release

2289d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8433587?v=4)[Peter Thaleikis](/maintainers/spekulatius)[@spekulatius](https://github.com/spekulatius)

---

Top Contributors

[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/spekulatius-gitpolicy/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M396](/packages/drupal-core-recommended)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49517.1k](/packages/blackfire-player)

PHPackages © 2026

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