git后推钩? [英] git post-push hook?
问题描述
可能存在重复:
git push后的本地执行钩子?
<
是否可以在我的工作存储库中设置一个git钩子,在我推送后在本地执行某些操作到远程分支?如果是的话,是哪个钩子?
如果在推送后需要执行一项常见任务,则可以制作一个别名,然后执行该操作。
Possible Duplicate:
Local executing hook after a git push?
git has a number of hooks that can call scripts near certain events.
Is it possible to setup a git hook in my working repository that executes something locally after I push to a remote branch? If so which hook is it?
The list of hooks in man githooks
is complete. There is no post-push hook. There are hooks which run in a repository after someone's pushed into it (i.e. for putting in the central repository), but nothing is triggered in the repository that you pushed from.
If there's a common task you need to do after pushing, you could make an alias which pushes then does that.
这篇关于git后推钩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!