让Heroku运行非主Git分支

编程入门 行业动态 更新时间:2024-10-25 03:21:05
本文介绍了让Heroku运行非主Git分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个托管在Heroku上的项目,它已经到了我想制作备用测试服务器的地步(所以我可以测试Heroku工作人员而不会搞乱制作)。

我已经建立了我的主Heroku远程运行我的主干和一个Heroku-dev远程,我希望运行一个备用分支。

我的问题是因为我的备用分支不是主人,Heroku不会建立它。

$ git push heroku-dev test 计数对象... ... 推送到非主分支,跳过构建。 到git@heroku:example-dev.git * [new branch] test - >测试

现在不能将此版本切换到主版本。很明显,有一种选择是创建一个全新的git repo,它是我的测试分支的一个克隆,但这听起来不太理想。

解决方案

git push heroku-dev测试:master 您可以使用Git将另一个分支推送到Heroku。

这会将您的本地测试分支推送到远程的主分支(在Heroku上)。

I have a project hosted on Heroku and it's gotten to the point where I want to make an alternate test server (so I can test Heroku workers without messing up production).

I have already set up my main Heroku remote running my trunk and a Heroku-dev remote on which I wish to run an alternate branch.

My problem is that since my alternate branch isn't master, Heroku won't build it.

$ git push heroku-dev test counting objects ... ... Pushed to non-master branch, skipping build. To git@heroku:example-dev.git * [new branch] test -> test

Switching this build to master is not an option at the moment. Obviously one option is to create a whole new git repo that's a clone of my test branch, but that doesn't sound very ideal.

解决方案

You can push an alternative branch to Heroku using Git.

git push heroku-dev test:master

This pushes your local test branch to the remote's master branch (on Heroku).

更多推荐

让Heroku运行非主Git分支

本文发布于:2023-11-26 18:34:36,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分支   Heroku   Git

发布评论

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

>www.elefans.com

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