Book Image

OpenShift Cookbook

By : Shekhar Gulati
Book Image

OpenShift Cookbook

By: Shekhar Gulati

Overview of this book

Table of Contents (19 chapters)
OpenShift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Running OpenShift on a Virtual Machine
Index

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 on your machine. Also, you will need to make use of the OpenShift application created in the Creating an OpenShift application using the rhc command-line client recipe.

How to do it…

Perform the following steps to configure a different branch for deployment...