Skip to content

Instantly share code, notes, and snippets.

@lkurzyniec
Created February 1, 2023 09:02
Show Gist options
  • Save lkurzyniec/aacd71d960639bd5a3bdb0d4f6013e8e to your computer and use it in GitHub Desktop.
Save lkurzyniec/aacd71d960639bd5a3bdb0d4f6013e8e to your computer and use it in GitHub Desktop.
commit git hooks
The repo .git\hooks folder isn't committed into source control. You may wonder how you share the goodness of the automated scripts you create with the team.
The good news is that, from Git version 2.9, you can now map Git hooks to a folder that can be committed into source control.
You could do that by updating the global settings configuration for your Git repository:
```
Git config --global core.hooksPath '~/.githooks'
```
If you ever need to overwrite the Git hooks you have set up on the client-side, you can do so by using the no-verify switch:
```
Git commit --no-verify
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment