Git-flow Cheat Sheet

A Programming › Git cheat sheet in English by MrManny
15,355 views 4,101 downloads 27 Sep 2018 History
3.4 avg · 2 ratings

Getting started

Initialize a new repository inside an existing git repository with git flow init.

Types of branches

Feature branch
For developing new features
Release branch
Staging area for new releases
Hotfix branch
Production fixes (based on master)
Bugfix branch
Develo­pment fixes (based on develop)
Support branch
Production fixes for a specific release

Features

Show feature branches
git flow feature [list]
Start a new feature
git flow feature start FEATUR­ENAME
Publish feature branch to remote
git flow feature publish FEATUR­ENAME
Finish up a feature
git flow feature finish FEATUR­ENAME
Finishing a feature branch will merge it into develop.

Releases

Show release branches
git flow hotfix [list]
Start a new release
git flow hotfix start VERSION
Publish release branch to remote
git flow hotfix publish VERSION
Finish up a release
git flow hotfix finish VERSION
Finishing a release branch will merge it into master and develop while also tagging it.

Hotfixes

Show hotfix branches
git flow hotfix [list]
Start a new hotfix
git flow hotfix start FIXNAME
Publish hotfix branch to remote
git flow hotfix publish FIXNAME
Finish up a hotfix
git flow hotfix finish FIXNAME
Finishing a hotfix branch will merge it into master.

Bugfixes

Show bugfix branches
git flow bugfix [list]
Start a new bugfix
git flow bugfix start FIXNAME
Publish bugfix branch to remote
git flow bugfix publish FIXNAME
Finish up a bugfix
git flow bugfix finish FIXNAME
Finishing a bugfix branch will merge it into develop.

Support

Show support branches
git flow support [list]
Start a new support branch
git flow support start VERSION

Comments (3)

onhelial 13:29 12 Jun 2020

How to rate it?

Reply
onhelial 13:15 12 Jun 2020

I think you should integrate the fact to the base can be provided. For instance: git flow feature start login feature/security

Reply
olivierlabbe 13:14 5 Dec 2019

Release section is in error, all statements are for hotfixes.

Reply

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