Show Menu

Gitflow Cheat Sheet by

Git Flow collaboration cheat sheet
git     gitflow     jgitflow

Feature Flow

Feature Flow - Maven JGitFlow Plugin

Feature start
mvn clean jgitfl­ow:­fea­tur­e-start
-DfeatureName=NewFeature
-DenableFeatureVersions=true
-DallowSnapshots=true
Feature finish
mvn clean jgitflow:feature-finish
-DfeatureName=NewFeature
-DenableFeatureVersions=true
-DallowSnapshots=true

Feature Flow - Manual Git

Feature start
git checkout develop
git pull origin develop
git checkout -b featur­e/­nom­efe­ature
man­ually update your code version to branch naming conven­tio­ns
Feature finish
sta­rting from featur­e/­nom­efe­ature branch
git commit -am"your feature comment here"
git checkout develop
git merge featur­e/­nom­efe­atu­re
man­ually update your code version to develop naming conven­tio­ns
git branch -D featur­e/­nom­efe­atu­re

Release Version conven­tions

 

Release Flow

Release Flow - Maven JGitFlow Plugin

Release start
mvn clean jgitfl­ow:­rel­eas­e-start
-DautoVersionSubmodules=true
-DallowSnapshots=true
-DallowUntracked=false
-DpushReleases=false
-DupdateDependencies=true
Release finish
mvn clean jgitfl­ow:­rel­eas­e-f­inish
-DpushReleases=true -DnoDe­plo­y=true
-DautoVersionSubmodules=true
-DallowSnapshots=false

Release Flow - Manual Git

Release start
git checkout develop
git pull origin develop
git checkout -b releas­e/­rel­eas­e-v­ersion
man­ually update your code version to release branch naming conven­tio­ns
Release finish
sta­rting from releas­e/­rel­eas­e-v­ersion branch
git commit -am"your release changes comment here"
git pull origin releas­e/­rel­eas­e-v­ersion
git checkout develop
git pull origin develop
git merge releas­e/­rel­eas­e-v­ersion
man­ually update your code version to stable version naming conven­tio­ns
git commit -am"­re­lea­se-­ver­sio­n"
git checkout master
git pull origin master
git merge releas­e/­rel­eas­e-v­ersion
--squash
git commit -am"­re­lea­se-­ver­sio­n"
git tag relea­se-­ver­sion
git push origin master --tag
git checkout develop
man­ually update your code version to next develop version naming conven­tio­ns
git commit -am"­ne­xt-­ver­sio­n"
git push origin develop
git branch -D releas­e/­rel­eas­e-v­ers­ion
 

Hofix Simple Flow

Hotfix Simple Flow - Maven JGitFlow Plugin

Hotfix start
mvn clean jgitfl­ow:­hot­fix­-start
-DautoVersionSubmodules=true
-DallowSnapshots=true
-DpushHotfixes=false
-DallowUntracked=false
-DupdateDependencies=true
Hotfix finish
mvn clean jgitfl­ow:­hot­fix­-finish
-DpushHotfixes=true -DnoDe­plo­y=true
-DautoVersionSubmodules=true
-DallowSnapshots=false

Hotfix Simple Flow - Manual Git

Same as Release one but with hotfix naming conven­tions

Hofix Complex Flow

Since a newer stable is present on master branch, tag and branch cannot be merged back.

Hotfix Complex Flow - Maven JGitFlow Plugin

Hotfix start: same as simple.
Hotfix finish: cannot be managed, use manual flow

Hotfix Complex Flow- Finish - Manual Git

sta­rting from hotfix­/h­otf­ix-­ver­sion branch
git commit -am"your hotfix changes comment here"
git pull origin hotfix­/h­otf­ix-­ver­sion
man­ually update your code version to stable version naming conven­tio­ns
git commit -am"­ho­tfi­x-v­ers­ion­"
git tag hotfi­x-v­ersion
git push origin --tag
git checkout develop
man­ually merge hotifx changes to develop if applic­able
git branch -D hotfix­/h­otf­ix-­ver­sion

Download the Gitflow Cheat Sheet

2 Pages
//media.cheatography.com/storage/thumb/mikesac_gitflow.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Git Cheat Sheet

          More Cheat Sheets by mikesac

          Maven Cheat Sheet
          Base Git Cheat Sheet