如何为非主分支设置heroku作为测试,然后将其合并到主分支?

编程入门 行业动态 更新时间:2024-10-25 05:22:26
本文介绍了如何为非主分支设置heroku作为测试,然后将其合并到主分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我对Rails还是很陌生,这个特殊的项目是我在Rails应用程序上进行协作的第一个项目.

I'm fairly new to rails and this particular project is the first where I'm working collaboratively on a rails app.

因此,我想在heroku上测试部署现有的应用程序,并在工作时将其合并到master中.这是因为在我知道自己在做什么之前,我不希望与师父打交道(阅读:heroku的作品).

Therefore I wanted to test-deploy the existing app on heroku and when it's working merge into master. This is because I don't want to mess with master until I know what I'm doing (read: heroku works).

除非特别说明,否则Heroku非常适合仅与ma​​ster一起使用. 此SO问题记录了如何部署非master分支,但确实没有详细说明当该分支合并到master时会发生什么情况.

Heroku is fairly attached to work with master only, unless specified. This SO question documents how to deploy a non-master branch but does not go into detail what happens when this branch is then merged into master.

它会使配置混乱吗,还是可以正常工作并接受master作为新部署的分支?如果没有,合并到主数据库后我该怎么做?

Does it mess up the configuration or will it work just fine and accept master as the new deployed branch? If not, what do I have to change once I merge into master?

推荐答案

该过程应为:

创建一个新分支:

git branch test git checkout test

进行更改,提交

git commit -a -m 'added a new test feature'

将测试分支推送到heroku

Push test branch to heroku

git push heroku-dev test:master

如果一切正常,请合并测试分支

If everything works, merge the test branch

git checkout master git merge test

推动大师

git push heroku-dev master

我一直这样做,没有发生任何错误.

I do this all the time and nothing wrong happens.

更多推荐

如何为非主分支设置heroku作为测试,然后将其合并到主分支?

本文发布于:2023-11-26 18:34:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634711.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分支   将其   何为   并到   测试

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!