1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-02 22:58:01 +00:00

Add Push Non-master Branch to Heroku as a devops til.

This commit is contained in:
jbranchaud
2015-05-16 17:15:56 -05:00
parent 27213f40c2
commit 517024a223
2 changed files with 30 additions and 0 deletions

View File

@@ -16,6 +16,10 @@ smart people at [Hashrocket](http://hashrocket.com/).
- [Swap Two Items in a Vector](clojure/swap-two-items-in-a-vector.md)
- [Type of Anything](clojure/type-of-anything.md)
### devops
- [Push Non-master Branch To Heroku](devops/push-non-master-branch-to-heroku.md)
### git
- [Accessing a Lost Commit](git/accessing-a-lost-commit.md)

View File

@@ -0,0 +1,26 @@
# Push Non-master Branch To Heroku
When using git to deploy your app to Heroku, it is expected that you push
to the `master` branch. When you run the following command
```
$ git push heroku master
```
Heroku will attempt to build and run your app. However, if you have a
`staging` branch for your application that you want to push to your
staging environment on Heroku, you cannot simply run
```
$ git push heroku staging
```
Heroku will only perform a build on pushes to the remote `master` branch.
You can get around this, though, by specifying that your `staging` branch
should be pushed to the remote `master` branch, like so
```
$ git push heroku staging:master
```
[source](https://coderwall.com/p/1xforw/make-heroku-run-a-non-master-branch)