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!
💡 You can rename a Heroku app at any time, but you may change your Git remote and public web address.
Note: Heroku now describes it in the project overview: Navigate to dashboard.heroku.com, click your app, then switch to the "deploy" tab and choose the deployment method "Heroku git" (selected by default). Then, you'll get instructions on how to connect an existing folder/git with Heroku.
You cant edit your files online and expect them to be in sync with your own repository , it defeats the purpose of using a vcs , as soon as you push an new version your online edited files will be deleted.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With