Once you have created the remote, the Heroku remote in this case, you can push your code to Heroku by typing the following command:
$ git push heroku master updating 'refs/heads/master'
The git push
command effectively pushes the code to the Heroku remote environment. In this case, we pushed the code to the remote master as we pushed the code for the first time from our local environment.
If you want to push code from a local branch to a remote master, you can use the following command:
$ git push heroku somebranch:master
Alternatively, you can merge the code with the master and push your code to Heroku.
If you use the special remote name origin, then your push command doesn't have to explicitly specify the remote name, and you could just type the following:
$ git push
Here, origin
is used as the default remote name.