/git-flow-hooks

This is a collection of git hooks to be used in conjunction with git-flow AVH edition. It also has some standard git hooks that were originally created by Sitebase(https://github.com/Sitebase/git-hooks). I just adjusted their code to make it work for me. These hooks are used by me for development of git-flow AVH Edition

Primary LanguageShellMIT LicenseMIT

git-flow hooks

By petervanderdoes and ddspog

This is a collection of git hooks to be used in conjunction with git-flow (AVH edition).

It also has some standard git hooks that were originally created by Sitebase. It was adjusted to make it work for me. I've also added some util hooks created by jaspernbrouwer to format the release and hotfix commit messages.

These hooks are used by me on my latests projects to maintain semantic version on every one.

License

You are free to copy, modify and distribute git-flow-hooks with attribution under the terms of the MIT license. See the LICENSE file for details.

Installation

Before using git-flow-hooks you need

How to use

To correctly use these hooks:

  • Clone the repository.
  • Create a softlink in your repository .git directory named hooks. If the directory exists, just delete it and substitute by this one.
  • Copy the file hooks_config.sample to the .git directory, naming it hooks_config.
  • Make the needed adjustments to the hooks_config file.

If you're interested in automatic commit messages to release or hotfix versions, there are some templates on this repo too. Tu use them, call:

git config gitflow.release.finish.messagefile /path/to/hooks/release-finish-default-message
git config gitflow.hotfix.finish.messagefile /path/to/hooks/hotfix-finish-default-message

You can read the files and create another version of them too.

Further info

  • When you start a release you can omit the version number. The filter will grep the version set in the stable info of the master branch and increase the patch level.
  • You can't commit on a master branch.
  • You can't commit files with merge markers.
  • Commit messages shorter than 8 are not allowed.