Sunday, December 21, 2014

Git-flow working branches

Git Flow is an add-on package to Git, which provides a set of commands to create and manage the branches. By default Got flow creates the following 2 branches

master – This is the main branch of code which at any given time will have the copy of the latest code which is deployed in the Production environment.
develop – This is the development branch which will have the latest stable version of the development code.

These are permanent branches, and will remain throughout the life cycle of the project.
Apart from the above permanent branches Git-flow creates and deletes supporting branches to support feature development, release management, hot-fixes etc. The following are the default prefixes used to creating these operational branches.

Feature Branches
A feature branch is created when we want to work on adding a new feature/module to the project, this will create a new branch with the prefix feature/. Once the feature development is completed the updates (commits) from this branch will be merged with develop branch and the feature branch will be deleted.

Release Branches
Once the development for a feature is completed and merged to the develop branch, a new release is created this branch will have a prefix ‘release/’, this will be used as the testing branch for the feature, all bugs identified during testing will be fixed and committed to this branch. Once all the bugs are fixed and the feature is stable the updates (commits) from this branch are merged with the master (production) and the develop branch. Once done this release branch will be deleted.

Hot Fix Branches
A hotfix branch will be created from the master (production) branch when there is an issue in production, all fixed for the bug are updated and committed to this branch, the changes are merged to the master (production) and the develop branch. Once done the hotfix branch is deleted.                 

         Only the main branches master (production) and develop will be maintained permanently,          all other branches will be created and deleted to accommodate feature development,                releases and fixes, this makes the Git branching structure clean and consistent.

Search Flipkart Products:

No comments: