开发者

git how to set a hook for all the projects

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜