This is especially useful if you want to automatically push to master on github (for example) when doing
git push heroku master to prevent you from ending up with the repo and your deployment being out of date.
It can be done like this (assuming you already have a Heroku branch setup):
git remote set-url --add --push heroku [email protected]:USERNAME/PROJECT.git git remote set-url --add --push origin [email protected]:ccgmurdoch/my-project.git
And you can verify that it worked by taking a look at the output of:
git remote -v
Once this is done, a
git push heroku master will automatically push the same branch to your github branch.