简体   繁体   English

如何验证git项目的release分支的修补程序已全部合并到master中?

[英]How can I verify that a git project's release branch's fixes have all been merged into master?

I have a git repository for a project at work. 我有一个正在工作的项目的git存储库。 Each time we release a version of our software, we create a release branch for it. 每次发布软件版本时,都会为其创建一个发布分支。 There's a release1.0 branch, a release 1.1 branch, etc. When we need to create a hotfix for that release, we commit the fix to that release branch, and then we merge that fix into our master development branch. 有一个release1.0分支,一个1.1版分支等。当需要为该发行版创建修补程序时,我们将该修复提交到该发行版分支,然后将其合并到我们的主开发分支中。

Sometimes we forget that last step in our rush to fix a production bug, and then a new release goes out without the hotfix for our previous problem. 有时,我们忘记了急于修复生产错误的最后一步,然后一个新版本发布,而没有针对我们先前问题的修补程序。

Is there an easy git command that checks to see if all our our release branches have been merged into master, and if not, which commits in which branches? 是否有一个简单的git命令来检查我们所有的发行分支是否已合并到master中,如果没有,则检查哪个分支在哪个分支中提交?

You could try git branch --no-merged master . 您可以尝试git branch --no-merged master This should list all branches that haven't been merged into master . 这应该列出所有尚未合并到master分支。

Another approach is to type git log master..branch , which will show empty results if branch is merged into master, and will otherwise present a list of unmerged commits. 另一种方法是键入git log master..branch ,如果将分支合并到master中,它将显示空结果,否则将显示未合并提交的列表。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 git 中,我如何验证 bug 修复在 Release 分支和 master 中 - In git, how do I verify that bug fixes are in both the Release branch and in master 我们可以在已经与 master 合并的分支上提交吗? - Can we commit on branch that's already been merged with master? 如何使用 Github API 从合并到 master 的分支中获取 PR 信息? - How do I get the PR information from a branch that's been merged to master using the Github API? 我如何知道一个分支是否已经合并到 master 中? - How can I know if a branch has been already merged into master? 什么是最简单的方法将git上的所有提交返回到尚未合并的master分支? - Whats the simplest way to return all commits on git to master branch that have not been merged already? 如果我已将一个Git分支合并到master,可以删除该分支本身吗? - If I have merged a Git branch to master, can I delete the branch itself? 我可以安全地删除已合并到master的Git主题分支吗? - Can I safely remove my Git topic branch that has been merged into master? 如何从Git的master分支中排除特定合并分支的提交? - How to exclude a specific merged branch's commit from the master branch in Git? 如何在一个git commit中将master分支的更改合并到我的side project分支中? - How do I merge a master branch's changes into my side project branch in one git commit? Git:如何删除已经提交,推送并合并到master的分支? - Git: How do I remove a branch that has already been committed, pushed, and merged into master?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM