Git post-receive - 如何检查推送的分支是否与主人合并 [英] Git post-receive - how to check if pushed branch is merged with master

查看:234
本文介绍了Git post-receive - 如何检查推送的分支是否与主人合并的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的团队中,我们通常会将所有任务推送到不同的分支机构,然后发布经理审查这些分支机构并将它们合并到主分支机构中。有时,团队 - 会员忘记合并他们的分支与主分支(推之前) - 所以我想要做的是 - 输出一个消息请合并主在用户推后 - 我假设我需要检查后收到挂钩在远程..有一些例子?或者我应该基本上做什么?

更新:主要原因 - 最小化潜在冲突的数量(因为提交者(不发布管理器)将解决它们)

解决方案

如果 git cherry new-branch master 有任何输出,然后有人在推送前没有重新绑定。


In our team we are usually pushing all tasks into separate branches, and after that release-manager review those branches and merge them into 'master' branch

Sometimes team-members forget to merge their branches with master branch(before pushing) - so what I'm trying to do is - output a message "Please merge with master" after user push - I assume I need to check something on post-receive hook on remote.. is there some examples?.. or what I should basically do ?

update: main reason for this - minimize number of potential conflicts (since committer(not release-manager) will resolve them)

解决方案

If git cherry new-branch master has any output, then someone didn't rebase before pushing.

这篇关于Git post-receive - 如何检查推送的分支是否与主人合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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