Tuesday, 6 May 2014

Git branches

The manage of branches in Git is might be the most powerful function of this Distribution revision control tool.

I am follow the recommendation of Nvie, which has the follow schema:

- There are two permanent branches, whom are "dev" and "master"
- The first thing to do with the new repository is create the "dev" branch from "master"
- To develop each function, a new branch from "dev" is created
- When a function has been finished, it is merged into the branch "dev". Here I use the option "--squash", which puts all the commits from the functional dev into one. This ensures the branch "dev" will not have middle commits from the function branches. whom could not be stable.
- When I consider that the branch "dev" has all the functions, I creates a new branch which is send to the tester.
- For each bug found by tester, a new branch will be created. Once the bug has been fixed, the new branch will be merged with the release branch. The release branch will be also merged with "dev" branch, to push the bug fix to the "dev" branch.
- When almost all the bugs has been fixed, the release branch will be merged with master branch to be released in production. A tag will be created.
- If after the product has been released a new bug has been found in the production environment, a new branch called "hotfix" will be created from "master" branch. After the bug has been fixed, the branch "hotfix" will be merged with the branch "master" and the branch "dev". A new version of the product with the bug fixed will be released in the market.

Source and more info:

No comments:

Post a Comment