Useful Snippets

Welcome!


This blog is used to collect useful snippets related to Linux, PHP, MySQL and more. Feel free to post comments with improvements or questions!

Are your smart devices spying on you? Make better purchasing choices and find products that respect your privacy at Unwanted.cloud

RSS Latest posts from my personal blog


Most viewed posts


Subscribe to RSS feed


Deploy any Git branch to your Heroku application

Stanislav KhromovStanislav Khromov

It’s pretty common on Heroku to have a staging app and a production app, with a Pipeline to promote changes from staging to production.

Typically if you use a pipeline, you write git push heroku master to push the latest master branch to your staging app and then promote it to production through the Heroku web UI.

But sometimes you may wish to temporarily test a different branch than master on your staging app. To do this, run:

git push heroku your-feature-branch:master

Where your-feature-branch is the name of the branch you want to deploy.

Remember that you shouldn’t promote this version to production. What you do is to merge the branch with master first after you’ve tested it and run git push heroku master to deploy the master branch to staging again before you finally promote your changes to production.

Source

Web Developer at Aftonbladet (Schibsted Media Group)
Any opinions on this blog are my own and do not reflect the views of my employer.
LinkedIn
Twitter
WordPress.org Profile
Visit my other blog

Comments 0
There are currently no comments.