Thursday 15 May 2014

Git Branching Model for Great Project

I got a development bump when using GIT. Currently i do the master branch only with git and develop all in master branch and log back to the master branch.

Now i start using the git branching for development of new feature, and all the way, i got confuse if i merge back to master, the current running stable version i cannot revert.

I remember the git tag usage, so i can tag the point where the code was stable, the same way when using svn for source code management.

But in git, i think and search a better way and a best proven practice somebody else employ and works in the project very well with single fighter or with many developers.

So i look for it in the web, and i found one. This is very interesting and i would like to share it and blog about it.

I will give the link [1] to the site where i learn a lot. Here are some summary i got :

  1. Always have a Master and Develop branch in origin repo.
  2. In master use Tag to pin point the stable release of the code. Master branch is the production ready code ready to be deploy.
  3. In your own repo or developer repo, you can have feature branch, release branch, hotfix branch. But not in you origin repo.
  4. Some rules to be remember :
    For branching out ::
    Feature branch always branching from develop branch.
    Release Branch always branching from a ready develop branch.
    Hotfix branch always branching from Master

    For Merging in :
    Feature branch always merge back to Develop branch when ready.
    Develop branch alway merge back to Release branch when ready.
    Hotfix branch always merge back to Master and Develop branch.
  5. Always remember the rules and better explanation is with a picture.
For the better understanding of course the picture :


Picture explain a thousand words right. Hope this help. What do you think about this method? are you have any other best method you employ in your GIT work flow with greater success, share it with me.

Source :
[1]  A-successful-git-branching-model , download at  15 May 00:07 +8 GMT

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More