GitPolicy
, (*1)
GitPolicy helps you and your development team to follow guidelines for the usage of git. These guidelines can include several options, see features., (*2)
Beta state: This package is still in development. Please be careful and patient if you decide to use it., (*3)
Features
This is the set of features to make your life easier:, (*4)
-
Define rules to achieve your desired git usage., (*5)
-
Forbidden actions (e.g. create new tag, push to master),, (*6)
-
Expectations for names of git tags and branches are possible., (*7)
-
Support for common conventions like "begins with a ticket numbers" and semantic tags are possible., (*8)
-
Simple to configure and install: One command to do install and initial set up. Configuration over one file: .gitpolicy.yml, (*9)
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., (*10)
The only direct requirement is PHP 5.4.37., (*11)
Note: During the installation Composer will be installed and used to manage the dependencies of GitPolicy., (*12)
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:, (*13)
-
Change into your project directory., (*14)
-
Check and run the following command in your project folder:, (*15)
# 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 :sunglasses:, (*16)
Configuration
All configuration is done in one file: .gitpolicy.yml, (*17)
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., (*18)
Some .gitpolicy.yml examples:, (*19)
More to come! If you want to share your .gitpolicy.yml as an example for a specific use case open a pull request ;), (*20)
Please see the issue tracker for planned enhancements and the roadmap., (*21)
- 0.1.x:
- adding tests and bug fixes only
- 0.2.0:
- 0.3.0:
License
For information regarding the license see license.md., (*22)