I am reading up on hooks at https://git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-Policy. I usually put wip ( work in progress) as my commit message. I intend to go back and clean it up but sometimes I push changes with message wip. I would like to prevent that.
However rather than putting hook just开发者_JAVA百科 for one project I would like this wip hook to be in all my projects. Is there a way to setup global hooks.
Look here Git commit hooks - global settings, which works thanks to this
you can set a global hooks directory with:
git config --global core.hooksPath ~/.git-hooks
精彩评论