开发者

git how to set a hook for all the projects

开发者 https://www.devze.com 2023-02-03 11:41 出处:网络
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

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
0

精彩评论

暂无评论...
验证码 换一张
取 消