Show Menu
Cheatography

Gitflow Cheat Sheet by

Git Flow collaboration cheat sheet

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 feature/nomefe­ature
manually update your code version to branch naming conven­tions
Feature finish
starting from feature/nomefe­ature branch
git commit -am"your feature comment here"
git checkout develop
git merge feature/nomefe­ature
manually update your code version to develop naming conven­tions
git branch -D feature/nomefe­ature

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 release/releas­e-v­ersion
manually update your code version to release branch naming conven­tions
Release finish
starting from release/releas­e-v­ersion branch
git commit -am"your release changes comment here"
git pull origin release/releas­e-v­ersion
git checkout develop
git pull origin develop
git merge release/releas­e-v­ersion
manually update your code version to stable version naming conven­tions
git commit -am"releas­e-v­ersion"
git checkout master
git pull origin master
git merge release/releas­e-v­ersion
--squash
git commit -am"releas­e-v­ersion"
git tag releas­e-v­ersion
git push origin master --tag
git checkout develop
manually update your code version to next develop version naming conven­tions
git commit -am"next-v­ersion"
git push origin develop
git branch -D release/releas­e-v­ersion
 

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

starting from hotfix/hotfix­-ve­rsion branch
git commit -am"your hotfix changes comment here"
git pull origin hotfix/hotfix­-ve­rsion
manually update your code version to stable version naming conven­tions
git commit -am"hotfix­-ve­rsion"
git tag hotfix­-ve­rsion
git push origin --tag
git checkout develop
manually merge hotifx changes to develop if applicable
git branch -D hotfix/hotfix­-ve­rsion
       
 

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