23

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!

fullstackplus
  • 1,061
  • 3
  • 17
  • 31

1 Answers1

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