如何合并两个远程Git分支?
我正在设置一个远程存储库,需要容纳代码的暂存版本和代码的生产版本(每个分支将部署到其指定的服务器以进行测试/生产)。
我只想允许将更改从本地计算机推送到远程暂存分支,然后当我们确定暂存分支可以使用时,我们可以将暂存分支合并到生产分支,然后从那里进行部署。
基本上,类似于:
- local.branch -> Remote.staging
- 在登台服务器上进行
- 测试Remote.staging -> Remote.Production
- 部署Remote.Production
是否可以通过这种方式管理远程存储库?如果是这样怎么办?
另外,有更好的方法吗?
I am setting up a remote repo that needs to house both a staging version of my code and a production version of the code (each branch will be deployed to their designated servers for testing / production).
I would like to only allow changes to be pushed from local machines to the remote staging branch, and then when we have decided that the staging branch is good to go, we could merge the staging branch into the production branch, and then deploy from there.
Basically, something like:
- local.branch -> remote.staging
- test on staging server
- remote.staging -> remote.production
- deploy remote.production
Is it possible to manage remote repos in this way? If so how?
Also, is there a better way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信(a)正常/支持的工作流程将是
这种情况对您来说不可能吗?
I believe that the (a) normal/supported workflow would be
Is that a scenario not possible for you?