Difference between revisions of "Git Flow"

From GLMWiki
Jump to: navigation, search
Line 16: Line 16:
 
  cd www.soolocks.com
 
  cd www.soolocks.com
 
  git flow init
 
  git flow init
 +
Feature branches? [feature/]
 +
Release branches? [release/]
 +
Hotfix branches? [hotfix/]
 +
Support branches? [support/]
 +
Version tag prefix? []v
 
answer default to all but the prefix. for that use v
 
answer default to all but the prefix. for that use v
  

Revision as of 08:33, 4 August 2014

Git Flow Workflow

Branches:

master => used for production code only

develop => used for developing new features (never ending)

hotfix => used for maintenance (get merged into master and develop once done)

release => used for creating new releases of code from the develop branch (merges back into master and develop)


to start an project clone the git repo and initialize the git flow

git clone git@cvs2:web/SooLocks.git www.soolocks.com
cd www.soolocks.com
git flow init
Feature branches? [feature/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []v

answer default to all but the prefix. for that use v

git release

git release start 1.0 (then do your work and commit)
git release finish 1.0

git hotfix

git hotfix start 1.0.1 (then do your work and commit)
git hotfix finish 1.0.1

When you're done with either a hotfix or release you need to push all branches and tags

git push --all
git push --tags

NOTICE: it is wise to do a git pull first before you start with a release or hotfix