Gitflow Cheat Sheet

A Programming › Git cheat sheet in English by mikesac

Git Flow collaboration cheat sheet

27,119 views 5,091 downloads 5 Feb 2017 History
3.7 avg · 2 ratings

Feature Flow

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 Version conventions

Release Flow

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

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

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

Badges

Nice Cheat Sheet Good Cheat Sheet

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.