覆盖现有的Heroku应用程序 [英] Overwriting an existing Heroku app

查看:144
本文介绍了覆盖现有的Heroku应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Sinatra应用程序,在Heroku上主持。最近,我从另一个文件夹开发出同样的应用程序。它不是一个分支,它只是一个并行的应用程序/目录,内容相同但代码不同。我想把这个新应用推送到Heroku,覆盖当前的应用程序。我不想在本地合并两者,只是继续保持旧的。这是什么正确的命令顺序?我怀疑是否运行 heroku create ,因为这将导致一个新的应用程序。谢谢!

I have a Sinatra app, hosted on Heroku. Lately, I've been developing that same app from a different folder. It's not a branch, it's just a parallel app / directory with identical contents but different code. I want to push this new app to Heroku, overwriting the app that's currently there. I don't want to merge the two locally, just continue from the new one while keeping the old. What's the proper command sequence for this? I have doubts about running heroku create, as that will result in a new app. Thanks!

推荐答案

首先这是可以的。这个过程很简单,首先我们需要添加Heroku作为新的应用程序的新远程存储库。

Firstly this is certainly possible. The process is quite simple, firstly we need to add Heroku as a new remote repository to your new app.

heroku git:remote -a project

您将用您的Heroku应用程序名称替换项目。其次,你需要强迫Heroku。

You would replace the 'project' with your Heroku app name. Secondly you would need to force a push to Heroku.

git push -f heroku master

注意:我们正在使用-f来强制推送。

Note: We are using an '-f' to force the push.

这篇关于覆盖现有的Heroku应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆