Difference between revisions of "Git Flow"

From GLMWiki
Jump to: navigation, search
Line 22: Line 22:
 
  Version tag prefix? []v
 
  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
 +
 +
NOTICE: If others have been working on the project and have made a release or hotfixes before you you'll need to update all your branches. (usually your on only develop and only that is the one you are updating)
 +
git pull --all
  
 
git release
 
git release

Revision as of 15:37, 5 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

NOTICE: If others have been working on the project and have made a release or hotfixes before you you'll need to update all your branches. (usually your on only develop and only that is the one you are updating)

git pull --all

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