From d0b371b1f574dada7de9700f439694340a5545e1 Mon Sep 17 00:00:00 2001 From: Anthony Date: Thu, 28 Jan 2021 05:47:01 -0500 Subject: [PATCH] docs: add git-flow recipe (#847) Adds documentation for the configuration of git-flow hooks --- docs/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/README.md b/docs/README.md index 070cba99a..ebd1cc6f8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -172,6 +172,23 @@ If you want to test a hook, you can add `exit 1` at the end of the script to abo exit 1 # Commit will be aborted ``` +## Git-flow + +If using [git-flow](https://github.com/petervanderdoes/gitflow-avh/) you need to ensure your git-flow hooks directory is set to use Husky's (`.husky` by default). + +```shell +git config gitflow.path.hooks .husky +``` +**Note:** +- If you are configuring git-flow _after_ you have installed Husky, the git-flow setup process will correctly suggest the .husky directory. +- If you have set a [custom directory](#custom-directory) for Husky you need to specify that (ex. `git config gitflow.path.hooks .config/husky`) + +To **revert** the git-flow hooks directory back to its default you need to reset the config to point to the default git hooks directory. + +```shell +git config gitflow.path.hooks .git/hooks +``` + # FAQ ## Does it work on Windows?