0% found this document useful (0 votes)
70 views

Resumo - Git Flow

The document describes a Git flow branching model for managing code development. It involves main branches for production (master) and integration (develop), as well as supporting branches for features, releases, and hotfixes. Feature branches are used to develop new functionality and are merged into develop when ready. Release branches are used to prepare releases and merged into both develop and master. Hotfix branches address issues in master and are also merged into both develop and master.

Uploaded by

Filipe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views

Resumo - Git Flow

The document describes a Git flow branching model for managing code development. It involves main branches for production (master) and integration (develop), as well as supporting branches for features, releases, and hotfixes. Feature branches are used to develop new functionality and are merged into develop when ready. Release branches are used to prepare releases and merged into both develop and master. Hotfix branches address issues in master and are also merged into both develop and master.

Uploaded by

Filipe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Git Flow Summary

Main branches
• master - production-ready
• develop

Supporting branches
• Feature branches
• Release branches
• Hotfix branches

Feature branches
• May branch off from: develop
• Must merge back into: develop
• Branching naming convention: anything except
master, develop, release-*, or hotfix-*

Creating a feature branch

$ git checkout -b myfeature develop

Incorporating a finished feature on


development

$ git checkout develop


$ git merge --no -ff myfeature
$ git branch -d myfeature
$ git push origin develop

1
Release branches
• May branch off from: develop
• Must merge back into: develop and master
• Branching naming convention: release-*

Creating a release branch

$ git checkout -b release -1.2 develop


$ ./bump - version .sh 1.2
$ git commit -a -m " Bumped version number to 1.2"

$ git checkout develop


$ git merge --no -ff release -1.2

$ git branch -d release -1.2

Finishing a release branch

$ git checkout master


$ git merge --no -ff release -1.2
$ git tag -a 1.2

$ git checkout develop


$ git merge --no -ff release -1.2

$ git branch -d release -1.2

Hotfix branches
• May branch off from: master
• Must merge back into: develop and master
• Branching naming convention: hotfix-*

2
Creating the hotfix branch

$ git checkout -b hotfix -1.2.1 master


$ ./bump - version .sh 1.2.1
$ git commit -a -m " Bumped version \
number to 1.2.1"

$ git commit -m "Fixed severe \


production problem "

Finishing a hotfix branch

$ git checkout master


$ git merge --no -ff hotfix -1.2.1
$ git tag -a 1.2.1

$ git checkout develop


$ git merge --no -ff hotfix -1.2.1

$ git branch -d hotfix -1.2.1

Author: Vincent Driessen


Original blog post: https://nvie.com/posts/a-successful-git-branching-model
License: Creative Commons BY-SA

3
release
feature
develop branches hotfixes master
branches

Tag
Time

0.1

Major Severe bug


feature for fixed for
Feature production:
next release
for future hotfix 0.2
release

Incorporate
bugfix in
develop

Tag
0.2

Start of
release
branch for

From this point on, 1.0


“next release”
means the release
after 1.0

Only
bugfixes!

Bugfixes from Tag


rel. branch
may be 1.0
continuously
merged back
into develop

Author: Vincent Driessen


Original blog post: http://nvie.com/posts/a-succesful-git-branching-model
License: Creative Commons BY-SA

You might also like