Git Branch: Have a good process development

Publié le par Jordan Samouh

Here is a ideal schema to develop a project:

The master is the production version: Nobody works directly on the production, but it is possible at all times, to create a branch from the master (for urgent bug fixes for example).

development branch is the latest version of stable development. Develop is the branch of integration.It is from this one that the next production version will be created.

No feature being developed is sent directly to development branch, only the completed features are sent.

Branch new feature (feature)

Made from branch:  development
The branch will be reintroduced in: development

When we want to create a new feature in our project, we will create a branch named this feature starting from the branch develop (which is the most recent branch).

This branch will remain open until the feature will not be completed.

git checkout -b nom_fonctionnalite develop

Switched to a new branch "nom_fonctionnalite"

Then, merge process with development branch when it is finished

$ git checkout develop
$ git merge nom_fonctionnalite
$ git branch -d nom_fonctionnalite 

$ git push origin develop
Create a new version (release) 

Made from branch: development
The branch will be reintroduced in: Master and development

When a set of functionality is finished, it is time to deliver production. Most of the time we go through a test  (functionnal or technical): This tests will be done on this branch.

For this test time, it will be possible for other developers to continue working on features for the following versions (branches in functionality).

Create the new version branch

$ git checkout -b release-x.y develop

$ git add README

$ git commit -m "Version x.y"
Once the tests validated by users and all minor fixes integrated merge the branch in the master
$ git checkout master
$ git merge --no-ff release-x.y
$ git tag -a x.y
$ git push --tags
Cette entrée a été publiée dans Symfony 2 Utils. Vous pouvez la mettre en favoris avec ce permalien.



Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

*


2 - one =

Vous pouvez utiliser ces balises et attributs HTML : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>