Book Image

Heroku Cloud Application Development

By : Anubhav Hanjura
Book Image

Heroku Cloud Application Development

By: Anubhav Hanjura

Overview of this book

Table of Contents (17 chapters)
Heroku Cloud Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Sending code to Heroku


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.