Skip to content

Git Flow

Eric Bouchut edited this page Apr 6, 2018 · 145 revisions

Installation

https://danielkummer.github.io/git-flow-cheatsheet/#setup

Configuration

https://danielkummer.github.io/git-flow-cheatsheet/#getting_started

git flow init

Using the default values (in between square brackets in the screenshot below) is the recommended way to go except you having existing branch that you have to stick with.

Feature

https://danielkummer.github.io/git-flow-cheatsheet/#features

Release

https://danielkummer.github.io/git-flow-cheatsheet/#release

Hotfix

https://danielkummer.github.io/git-flow-cheatsheet/#hotfixes

git hotfix start A.B.C.D

A hotfix branch starts off master. Here is the command git flow runs under the hood to start the hotfix, so you don't have to:

git checkout -b hotfix/A.B.C.D master

Publish a hotfix branch

The command is git flow hotfix publish A.B.C.D but your mileage may vary, because maybe it is not considered a common use case to push a hotfix branch to the remote repository. If it does not exist, this is the case on MacOS for instance, then use instead git push origin hotfix/A.B.C.D

Finish a Hotfix

git hotfix finish A.B.C.D

Here are the commands git flow is running under the hood to finish the hotfix

Hotfix and Release Tag

Release and hotfix tags are added exclusively on the master branch. Git flow does this for you when finishing a hotfix/feature branch, so you don't have to!

Clone this wiki locally