Skip to content

Commit 78c6cf1

Browse files
committed
Update README
1 parent c5c0960 commit 78c6cf1

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Main features are:
3131
* [Manual installation](#manual-installation)
3232
* [Configuration](#configuration)
3333
* [Mix path](#mix-path)
34-
* [Git path](#git-path)
34+
* [Git submodules](#git-submodules)
3535
* [Troubleshooting in docker containers](#troubleshooting-in-docker-containers)
3636
* [Auto install](#auto-install)
3737
* [Hook configuration](#hook-configuration)
@@ -103,11 +103,19 @@ config :git_hooks,
103103
mix_path: "docker-compose exec mix",
104104
```
105105

106-
### Git path
106+
### Git submodules
107107

108-
This library expects `git` to be installed in the `.git` directory relative to your project root, or when using git submodules, the root of the superproject. If you want to provide a specific path to a custom git directory, it can be done using the `git_path` configuration.
108+
This library supports git submodules, just add your `git_hooks` configuration to
109+
any of the submodules projects.
109110

110-
The follow example would run the hooks within a git submodule:
111+
Setting a custom _git hooks_ config path is also supported:
112+
113+
```
114+
git config core.hooksPath .myCustomGithooks/
115+
```
116+
117+
If for any reason you want to override the folder of the _git hooks_ path you
118+
can add the following configuration:
111119

112120
```elixir
113121
config :git_hooks,

0 commit comments

Comments
 (0)