Coexistence between GitHub and ‘Heroku Git’

Ok, you’ve deployed your app to Heroku but there is something missing. You want to show the world your new work done. You want to show your brand new awesome code.
How to do that? It’s very simple actually.

First you need to create a new repository on your GitHub account.

Now you just have to add GitHub as a separate remote repository:

In my case it was:

Now you can push to GitHub using the command below:

For the first time you will have to do a forced push (–force). Because now you are assuming that you’re pushing what used to be the repository you used exclusively for Heroku. But don’t worry. You’ll still be able to push to Heroku using git push heroku master.

See ya!