Azure Devops-挑选出大师分支
我有一个场景,有时我需要将UAT分支的一些提交挑选到我们的主分支。这是因为业务有时会要求仅特定的“功能”从UAT转移到生产。我需要能够选择某些承诺以作为PR前进。
我遇到的问题是,当试图从一个提交(从UAT分支)到主人的提交中,Azure Devops给我错误...
”可以在本地执行。”
我能够针对我的UAT,QA和集成分支机构进行相同的模式,我只对我们的主人分支有这个问题。我在源分支机构中没有任何冲突,所以我不相信它。我也没有任何特殊规则的主人分支,这应该使我无法进行以UI为基础的樱桃挑选。
我真的不能让我们的开发人员在本地这样做,所以我希望他们能为此使用UI。
我们正在使用ADO托管Salesforce代码的存储库。我们使用另一个处理CICD管道的系统。
这样的高级背景是,我们可能有2个或更多的公关已被推广并部署到UAT,但是业务可能要求我们只部署某些公关。因此,一些公关可能会在几个开发周期中对付主人。问题是,当其他公关的转移以及我们需要将它们从UAT推广到掌握时,所有的更改都将添加到UAT>大师PR是因为PR中的代码在保存模式中尚未承诺主持,因此随后的PR会拿起这些更改并尝试将其合并,我们不希望这样做。
想法是,我们可以从UAT作为PR进行挑选。这些仅包含我们实际要部署的文件,而不是所有内容。
希望有人可以帮助我解决这种情况。
非常感谢您的指导!
I have a scenario where I will sometimes need to cherry-pick some commits from our UAT branch into our MASTER branch. This is because the business sometimes will request that only specific "features" are moved from UAT to production. I need to be able to pick certain commits to move forward as PR.
The issue I am having is that when try to cherry pick from one the commits (from the UAT branch) to master, Azure DevOps give me the error...
"Encountered conflicts when cherry-picking commit "42af19". This operation needs to be performed locally."
I am able to do this same pattern against my UAT, QA and Integration branches, I only have this issue against our master branch. I don't have any conflicts in the source branch so I don't believe its that. I also don't have any special rules for the master branch that should keep me from doing a UI based cherry-pick.
I really can't have our developers do this locally so I am hoping for some sort of option where they can use the UI for this.
We are using ADO to host the repo for our Salesforce code. We use another system that handles the CICD pipeline.
The high-level background for this is that we have may have 2 or more PR's that have been promoted and deployed to UAT, but the business may request that we only deploy certain ones. So some PR's might remain open against master for a few dev cycles. The issue is when other PR's move through and we need to promote them from UAT to master, ALL of the changes are getting added to the UAT > MASTER PR due to the fact that the code in the PR's that are in the holding pattern have not been committed to master, so the subsequent PR's would pick up those changes and try to merge them in, and we don't want that.
The thought is that we could cherry-pick commits from UAT as a PR. These only only contain the files we actually want to deploy, not EVERYTHING.
Hopefully someone can help me out with this scenario as I am a little stuck.
Thank you all very much for your guidance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我一直在制定Salesforce类似的分支策略。通常,在这种情况下,我们会执行以下操作:
git Checkout -b gs -pipeline /...
git cherry-pick commit-hash1 optional-commit-hash2
gs-pipeline/.. .. - >
Master
不幸的是,就我而言,没有简单的方法可以在UI中解决此问题。
但是,当您从
Master
- >下向下合并时uat
(直接或通过单独的分支)可以解决您的问题。它应该是安全的,因为主/PRD上的事物应该已经在UAT和所有较低的环境上。I have been working with a similar branching strategy for Salesforce. Normally in this situation, we would do the following:
git checkout -b gs-pipeline/...
git cherry-pick COMMIT-HASH1 OPTIONAL-COMMIT-HASH2
gs-pipeline/...
->master
Unfortunately, there is no easy way to solve this within UI as far as I am concerned.
However, when you would down merge from
master
->uat
(directly or via a separate branch) that may solve your issue. It should be safe as things on master/PRD should already be on UAT and all lower environments.