简体   繁体   English

从git中的发布提交同步开发分支

[英]sync develop branch from release commits in git

We have implemented git model in our project. 我们在项目中实现了git模型 Developers have access to only develop branch. 开发人员只能访问开发分支。 Release and master branch are in control of build engineer. 发布和主分支由构建工程师控制。 During release planning stage we copy code from develop branch to release, and increment the version on develop branch. 在发行计划阶段,我们将代码从developer分支复制到发行版,并在developer分支上增加版本。

Developer should create a bug fix branch from release and raise a pull request to merge it into release. 开发人员应从发布版本创建一个错误修复分支,并提出拉取请求以将其合并到发布版本中。 So code goes to release branch directly bypassing develop branch. 因此,代码绕过了develop分支直接去了release分支。

I can click sync in Bit Bucket to get develop branch up to date, but it would be great to keep the branches in sync automatically. 我可以单击“ Bit Bucket”中的“同步”以使开发分支保持最新状态,但是最好使分支自动保持同步。

Is there any way to automatically sync develop branch with the commits from release ? 有什么方法可以自动同步开发分支与发布中的提交? develop branch is now behind release because it doesn't have the merge commits that happened from the pull request merging. developer分支现已发布,因为它没有合并请求合并中的合并提交。

您可以使用BitBucket Webhooks触发对“发布”分支的每次推送,然后将此通知发送到Continuous Integration工具(例如,Jenkins)以将“发布”与“开发”同步。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM