This trick let’s you push to two repositories with one command. It is great for projects that need really rapid development and aren’t yet populated by many users. Before using make sure that deploying with every
git push will not result with catastrophic consequences.
First, repo needs to be created:
$ git init $ git remote add origin [email protected]:meeDamian/meeDamian.github.io.git
$ git clone [email protected]:meeDamian/meeDamian.github.io.git
Second, add heroku remote:
$ git remote set-url origin --push --add [email protected]:meedamian-com.git
Previous command replaces Github’s push remote. To re-add it:
$ git remote set-url origin --push --add [email protected]:meeDamian/meeDamian.github.io.git
If everything went well you should get something like this:
$ git remote -v origin [email protected]:meeDamian/meeDamian.github.io.git (fetch) origin [email protected]:meedamian-com.git (push) origin [email protected]:meeDamian/meeDamian.github.io.git (push)
To push&deploy, after some commits, just:
$ git push
Let me know if you think this trick is awesome, terrible or you know how to improve it even further!