Overwriting an existing Heroku app

孤街醉人 提交于 2019-11-27 10:56:07

问题


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!


回答1:


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

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

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



来源:https://stackoverflow.com/questions/14437903/overwriting-an-existing-heroku-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!