News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Freek Lijten's Blog:
Git commit hooks using PHP
July 06, 2011 @ 09:48:51

In this new post from Freek Lijten he looks at a set of git commit hooks written in PHP for making things happen before, during and post commit.

Git hooks are usually found inside the .git/hooks folder of your git repository. Git tends to provide sample hook files there which are postfixed with a .sample extension. These examples are written as shell scripts. Take a look at them if you want, but today we're talking PHP!

He briefly touches on the types of hooks you can set up and includes two example scripts showing a pre-commit lint test for the changed files and a check during the commit on the message given for a certain standard (in their case, it must start with a three letter code).

0 comments voice your opinion now!
git commit hook tutorial precommit postcommit commitmsg example


blog comments powered by Disqus

Similar Posts

Pierre-Alain Joye's Blog: ext/filter, API frozen (!) and fixes, 0.11.0 is out

SitePoint PHP Blog: Creating a Subscription-Based Website with Laravel and Recurly, Part 1

PHPBuilder.com: PEAR's HTML_QuickForm

DevShed: Custom Session Management Using PHP and MySQL

Zend Developer Zone: Accessing DB2 Data Inside of i5/OS


Community Events





Don't see your event here?
Let us know!


voicesoftheelephpant community composer tool series library podcast interview laravel artisanfiles language version list introduction release security conference symfony opinion framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework