Document toolboxDocument toolbox

Usage of Git master and develop branches in code deployment

Master - develop approach

Master and develop approach is one of possible GIT repository workflows.

Instead of a single master branch, this workflow uses two branches to record the history of the project. The master branch stores the official release history, and the develop branch serves as an integration branch for features:

 

Mentioned above means that development happens in two separate directions: master and development. Master could be also called production and development as a testing branch. Branch respectively means the independent clone (copies) of code (for a user it just means the program or client-software). 

Master branch serves as a working software (or code). This branch stores adjustments only tested and approved by customer and sometimes is delivered only in releases if that is required.
Development branch is used for development purposes: this is a place where all new features and fixes appear first. After successful testing and approval, code is cloned (copied) from develop to master brach. 

Note that if a bug appears in the development branch, the production is not influenced by that. So mentioned approach minimizes the risks and costs of unsuccessful implementation of a feature as this feature can be repeatedly be adjusted until it is right and only then merged to the master code.

For this workflow to work we will

  • usually create a new feature branch for every request, do our work in it so it does not overlap with any other parallel work happening
  • once we think feature is ready we will merge it to develop branch and give this code to you for initial testing
  • if you will find any issues with it we will add further fixes in the feature branch and again merge to develop branch once those are finished
  • when you finally accept the solution we will merge it to master branch and you can deploy the code in production environment

So for example if there are 3 parallel issues being developed by us and you accept only first of them as finished, you can go live with it and we can keep working on the rest of them and realease them one by one once you are sure they are ready for live:

Please make sure you are deploying the right code to the right system

Please note that use of GIT repository allows minimizing costs of unsuccessful implementation even in master code: it allows reverting the code to any previous versions, allowing to revert incorrect changes (so production is back to a working state) if some issues are discovered only in production.

You can even ask us for access directly to your code repository so you can set up semi-automated code update to your test and/or live environment so that we don't have to send you any code at all!

For more information, please use the full GIT repository manual on https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow