git flow Quick Start Guide¶
- Table of contents
- git flow Quick Start Guide
Our pilot study of using the
git flow workflow and associated tools started with the art package. As a result of this trial, most multi-developer packages managed by the SSI group now use
Here are some quick tips to get you started.
git flow for the first time in a particular local repository.¶
git clone ... cd <repo-dir>or
cd <repo-dir> git pull
git flow init -d
git flow init -ddoes not always set the "production release branch". This will occur, for example, if there are no commits on the master branch at the time you execute it. When this happens, run
git flow initwithout the
-doption. Specify the "Branch name for production releases" as "master" and accept the defaults for the remaining questions.
git flow init Which branch should be used for bringing forth production releases? - develop Branch name for production releases:  master Which branch should be used for integration of the "next release"? - develop Branch name for "next release" development: [develop] How to name your supporting branch prefixes? Feature branches? [feature/] Release branches? [release/] Hotfix branches? [hotfix/] Support branches? [support/] Version tag prefix? 
To make the develop branch the current branch when the repo is cloned from Redmine (and for browsing the repository with Redmine) do the following as a manager after the master and develop branches created by your
git flow init command have been pushed to Redmine with
git push origin master develop:
ssh p-<project>@cdcvs.fnal.gov "cd /cvs/projects/<repo> && git symbolic-ref HEAD refs/heads/develop"N.B. With the current version of
gitin use by default on the Redmine git server (1.6.4), clones will continue to be initialized on the
masterbranch until the two branches diverge (e.g. with a commit and push to the
developbranch). When the
gitin use on the server is upgraded, this problem will be solved.
For particular development tasks.¶
git flow feature start MyFeatureAddition
- Work ...
- commit as needed, but do not push
- If you need to fetch upstream changes:
git fetch origin git rebase origin/develop
- Back to 2. until done.
git flow feature finish
git push origin develop
To publish a feature branch for collaboration purposes.¶
git flow feature publish <feature>
N.B. Once a feature has been published,
git rebase should not be used: use
git merge origin/develop instead.
To make a new release.¶
git flow release start vx_yy_zz
- Work ...
- All code changes should already be made, this step is primarily to update the version (i.e. product_deps).
- Make sure you commit any changes before proceeding.
git flow release finish vx_yy_zz
git push origin develop master
git push --tags
Set default checkout branch and redmine repository view to develop.¶
As a repository manager:
ssh p-<rep>@cdcvs.fnal.gov "cd /cvs/projects/<rep> && git symbolic-ref HEAD refs/heads/develop"