Just finised work on my other
branch. Now I need to test that this works on Heroku before I merge with the master
branch.
Is it possible to push the other
branch to Heroku and it replace the contents of my last push which was from the master
branch?
Heroku only deploys code that you push to the master or main branches of the remote. Pushing code to another branch of the heroku remote has no effect.
Head over to your heroku dashboard again, create a new app, go to it's settings tab and copy the heroku git url: https://git.heroku.com/sdk-heroku-staging.git , add it as aremote destination to your local repo: git remote add staging https://git.heroku.com/sdk-heroku-staging.git , here, “staging” is the name of our ...
You can use https://github.com/ddollar/heroku-push and push directories without git.
Yes, pushing to a branch named differently that your current one is possible using the syntax:
git push heroku other:master
This tells Git to push the contents of your other
branch to the master
branch on the heroku
remote. Keep in mind that you may have to force push if there are commits on heroku/master
that don't appear in your other
branch.
For more information have a look at the documentation of the <refspec>
option to git 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