Skip to content

Commit

Permalink
docs: add git-flow recipe (#847)
Browse files Browse the repository at this point in the history
Adds documentation for the configuration of git-flow hooks
  • Loading branch information
red2678 committed Jan 28, 2021
1 parent b8e8d9e commit 0c02440
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/README.md
Expand Up @@ -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?
Expand Down

0 comments on commit 0c02440

Please sign in to comment.