Git Branching Model Part

962    Asked by NishitaChoudhary in Devops , Asked on Nov 18, 2019
Answered by Vikash Kapoor

There are many ways to do branching in GIT. One of the popular ways is to maintain two branches:

I. master: This branch is used for production. In this branch HEAD is always in production ready state.

II. develop: This branch is used for development. In this branch we store the latest code developed in project. This is work in progress code.

Once the code is ready for deployment to production, it is merged into master branch from develop branch.

The idea is that you have somewhere to go to where you can find the ‘live’ code working in production on that day.

The reason being is that a query will come in “The code was working ok at the end of May, and something went wrong thereafter” - Lets roll back and see what changed.



Your Answer

Interviews

Parent Categories