Skip to content

Commit e6a8012

Browse files
committed
Add documentation
1 parent 0e1e21f commit e6a8012

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,15 @@ The following command line options are supported:
6161
You shouldn't have to think about the hooks once they are installed. Just pull, checkout, and rebase as normal and they should work fine. If you find that `git_rails` hasn't fired when it should follow the command instructions to run it manually.
6262

6363
Also, the hooks are optional, you can use `git_rails` without them!
64+
65+
#### Monorepo usage
66+
67+
If the Rails project is not in the root of the Git repository, execute `git_rails` and hooks in the Rails directory.
68+
69+
For example, to make the post-checkout hook run in a particular subdirectory, create the following `.git/hooks/post-checkout` file:
70+
71+
```sh
72+
#!/bin/sh
73+
cd path/to/rails/project
74+
exec /path/to/git_rails/hooks/post-checkout "$@"
75+
```

0 commit comments

Comments
 (0)