git后推钩? [英] git post-push hook?

查看:136
本文介绍了git后推钩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能存在重复:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆