Download the PHP package cheppers/git-hooks without Composer

On this page you can find all versions of the php package cheppers/git-hooks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package git-hooks

sweetchuck/git-hooks

Triggers custom scripts from Git hooks.

This package provides a bridge between the un-versioned ./.git/hooks/* scripts and scripts in your Git repository.

CircleCI

When to use

If you want to put your Git hook scripts under VCS to share them with your teammates then this is the tool you are looking for.

How to use

  1. Step into you existing package's directory (or create a new one with git init && composer init)
  2. Run composer require --dev 'sweetchuck/git-hooks'
  3. Then you have two option
    1. Rely on Git hook scripts which are shipped with this package and implement the logic in your ./.git-hooks file.
    2. Or create a ./git-hooks directory and create Git hook files in it. (eg: ./git-hooks/pre-commit)
  4. The deployment script will be automatically triggered by the post-install-cmd Composer event.

Configuration

Example composer.json file:

Configuration - core.hooksPath

Type: string

Default value: vendor/sweetchuck/git-hooks/git-hooks (dynamically detected)

If the Git version is >= v2.9 then this value will be used to set git config core.hooksPath <PATH>. If Git is older than 2.9 then the content of this directory will be symbolically linked or copied to ./.git/hooks directory.

Configuration - symlink

Type: boolean

Default value: false

This configuration option will be used only if Git version is older than v2.9. Copy or symlink Git hook files from the original location (provided by the core.hooksPath configuration) to the ./.git/hooks.

Example ./.git-hooks file

If you use the Git hooks script from this package (vendor/sweetchuck/git-hooks/git-hooks) you will need custom script which catches Git hooks add triggers something really useful.

Copy the content below into ./.git-hooks

Example ./RoboFile.php


All versions of git-hooks with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
ext-json Version *
ext-mbstring Version *
composer-plugin-api Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cheppers/git-hooks contains the following files

Loading the files please wait ....