Configuring the default Git branch for deployment

Every OpenShift application has an associated remote Git repository. When you push the source code to an application gear using git push, you are pushing the source code to a Git remote named origin and branch named master. Every application is configured to autodeploy when code is pushed to the master branch on a remote origin. But it might so happen that you would like to use the master branch for development while using the production branch for deployment. In this recipe, you will learn how to configure an OpenShift application, where you will use a branch named production for deployment and a master for development.

Getting ready

In order to complete this recipe, you will need rhc installed ...

Get OpenShift Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.