Created
February 1, 2023 09:02
-
-
Save lkurzyniec/aacd71d960639bd5a3bdb0d4f6013e8e to your computer and use it in GitHub Desktop.
commit git hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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