You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| This configuration option allows you display the output of each
146
-
| command during execution directly for easy debug.
147
-
|
148
-
*/
149
-
'debug_output' => false,
150
-
```
151
-
### Laravel Sail support
95
+
### 🐳 Laravel Sail support
152
96
153
97
If you are using Laravel Sail and maybe not lokal PHP is installed, you can adjust the following parameters in the git-hooks.php config file:
154
98
155
99
```php
100
+
// config/git-hooks.php
156
101
'use_sail' => env('GITHOOKS_USE_SAIL', false),
157
102
```
158
103
This will force the local git hooks to use the `sail` command to execute the hooks.
159
104
160
-
### Docker support
105
+
### 🐳 Docker support
161
106
162
107
By default commands are executed locally, however this behavior can be adjusted for each hook using the parameters `run_in_docker` and `docker_container`:
1) If you need to create a custom Git hook for your project, Laravel Git Hooks makes it easy with the `git-hooks:make` Artisan command. To create a new custom hook, simply run the following command:
200
131
```bash
201
132
php artisan git-hooks:make
@@ -214,7 +145,7 @@ The package provides additional configuration options for fine-tuning hook behav
214
145
php artisan git-hooks:register
215
146
```
216
147
217
-
## 3️⃣ Handling Git Hooks
148
+
## 4️⃣ Handling Git Hooks
218
149
### Pre-commit Hook
219
150
> The pre-commit hook is run first, before you even typein a commit message. It's used to inspect the snapshot that's
220
151
> about to be committed, to see if you've forgotten something, to make sure tests run, or to examine whatever you need to
@@ -391,7 +322,7 @@ return [
391
322
392
323
The class structure of the `pre-push` hooks is the same as the `post-commit` hook shown right above, but implementing `\Igorsgm\GitHooks\Contracts\PrePushHook` interface.
0 commit comments