创建和/或推送新分支时的Git钩子 [英] Git hook when a new branch is created and/or pushed
本文介绍了创建和/或推送新分支时的Git钩子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想挂钩创建一个新的分支。无论是在创建分支还是第一次完成时。是一个还是两个都可能?
I want to hook into the creation of a new branch. Either when the branch is created or when the first push is done. Is one or both possible?
推荐答案
它是更新钩子,它为新的裁判获得一个零沙,标签
It's the update hook, it gets a zero sha for new refs, branches will say heads not tags
这篇关于创建和/或推送新分支时的Git钩子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文