本文介绍了适用于git stash的git hook是否适用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行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-merge
  • git rebase : post-rewrite (also runs on git commit --amend)
  • git checkout : post-checkout

来源: githooks(5)

这篇关于适用于git stash的git hook是否适用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 04:00