问题描述
运行git stash apply
后是否有一个可以应用的git钩子?如果是这样,那是什么?更笼统地说,是否有一个提交挂钩在合并,变基,隐藏等之后运行.基本上,任何时候文件由于git操作而发生变化.代替单个钩子,我将接受以下钩子列表:合并后,变基后,结帐后,存放隐藏.
Is there a git hook that gets applied after I run git stash apply
? If so, what is it? More generically, is there a single commit hook that gets run after a merge,rebase,stash, etc. Basically any time a file changes due to a git operation. In lieu of a single hook, I'd accept a list of hooks for the following: post merge, post rebase, post checkout, post stash apply.
推荐答案
git stash apply
似乎没有一个.大多数趋向于发生在实际的提交,推送或更新上,而不是在工作树中进行更改.此列表可能会有所帮助:
Doesn't look like there is one for git stash apply
. Most tend to occur on actual commits, pushes, or updates..not to changes in the working tree. This list may help:
git merge
: post-mergegit rebase
: post-rewrite (also runs ongit commit --amend
)git checkout
: post-checkout
来源: githooks(5)
这篇关于适用于git stash的git hook是否适用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!