Heroku网站从不同的分支上传(Heroku Site Upload from Different branch)

编程入门 行业动态 更新时间:2024-10-14 18:20:39
Heroku网站从不同的分支上传(Heroku Site Upload from Different branch)

我正在开发一个团队项目,我的分支是我想上传到heroku的分支。 我创建了网站,我的文件index.php和composer.json是正确的。

我试图从我的分支机构推送到heroku:

git push heroku develop-mark

它回应:

Counting objects: 98, done. Delta compression using up to 4 threads. Compressing objects: 100% (90/90), done. Writing objects: 100% (98/98), 68.22 KiB | 0 bytes/s, done. Total 98 (delta 45), reused 0 (delta 0) remote: Pushed to non-master branch, skipping build. To https://git.heroku.com/warm-wave-1067.git * [new branch] develop-mark -> develop-mark

I was working on a team project and my branch is the branch I wanted to upload to heroku. I created the site and my files index.php and composer.json are correct.

I tried to push to heroku from my branch with :

git push heroku develop-mark

It responded with:

Counting objects: 98, done. Delta compression using up to 4 threads. Compressing objects: 100% (90/90), done. Writing objects: 100% (98/98), 68.22 KiB | 0 bytes/s, done. Total 98 (delta 45), reused 0 (delta 0) remote: Pushed to non-master branch, skipping build. To https://git.heroku.com/warm-wave-1067.git * [new branch] develop-mark -> develop-mark

最满意答案

Heroku 只能从它的master分支构建 ,但这并不意味着你必须在本地工作:

此命令将忽略除master之外推送到Heroku的分支。 如果您在本地处理另一个分支,则可以在推送之前合并到主服务器,或者指定要将本地分支推送到远程主服务器。 要推送除master之外的分支,请使用以下语法:

$ git push heroku yourbranch:master

在您的情况下,将您的本地develop-mark分支推送到Heroku的master如下所示:

git push heroku develop-mark:master

Heroku only builds from its master branch, but that doesn't mean that you have to work on master locally:

Branches pushed to Heroku other than master will be ignored by this command. If you’re working out of another branch locally, you can either merge to master before pushing, or specify that you want to push your local branch to a remote master. To push a branch other than master, use this syntax:

$ git push heroku yourbranch:master

In your case, push your local develop-mark branch to Heroku's master like so:

git push heroku develop-mark:master

更多推荐

本文发布于:2023-08-03 10:52:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1387019.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分支   上传   网站   Heroku   Upload

发布评论

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

>www.elefans.com

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