Rome
Node.js
Group
git flow, a successful git branching model - Dec 23 2011
Luca Lanziani - @_Nss_
git flow, a successful git branching model - Dec 23 2011
Luca Lanziani - @_Nss_
a successful git branching model. [1]
via http://nvie.com/
Improve productivity and maintainability keeping our Git repositories nice and tidy.
(just) a branching strategy and release management
master and develop may be synced with the origin.
feature branches
hotfix branches
release branches
develop
develop
$ git checkout -b myfeature develop //Switched to a new branch "myfeature"
commit changes...
$ git checkout develop //Switched to branch 'develop' $ git merge --no-ff myfeature //Updating ea1b82a..05e9557 $ git branch -d myfeature //Deleted branch myfeature (was 05e9557). $ git push origin develop
master
develop
ad master
$ git checkout -b hotfix-1.2.1 master
bump the version...
$ git commit -a -m "bumped version number to 1.2.1" $ git checkout master $ git merge --no-ff hotfix-1.2.1 $ git tag -a 1.2.1 $ git checkout develop $ git merge --no-ff hotfix-1.2.1 $ git branch -d hotfix-1.2.1
develop
develop
ad master
$ git checkout -b release-1.2 develop
bump the version...
$ git commit -a -m "bumped version number to 1.2" $ git checkout master $ git merge --no-ff release-1.2 $ git tag -a 1.2 $ git checkout develop $ git merge --no-ff release-1.2 $ git branch -d release-1.2
released in github by nvie
$ brew install git-flow //or $ port install git-flow
$ wget --no-check-certificate -q -O \ - https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | \ sudo bash
$ git flow init
No branches exist yet. Base branches must be created now. Branch name for production releases: [master] 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? []
$ git flow feature start myfeature
$ git flow feature finish myfeature
$ git flow hotfix start hotfix-1.2.1
$ git flow feature finish hotfix-1.2.1
$ git flow release start release-1.2
$ git flow feature finish release-1.2
Thanks for watching