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!
Asked
Active
Viewed 1.1k times
23

fullstackplus
- 1,061
- 3
- 17
- 31
1 Answers
60
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.

webjames
- 1,087
- 8
- 12
-
I'm in rails 4 - got this error: !`git:remote` is not a heroku command. !See `heroku help` for additional details. – zero_cool Aug 06 '14 at 16:28
-
@zero_cool you probably needed to update your heroku toolbelt – Dreyfuzz Jun 02 '17 at 16:58