Anda di halaman 1dari 2

SOP for Git Branching

Based and adopted from Vincent Driessen's A Successful Git Branching Model - http://nvie.com/posts/
Based and adopted from Vincent
a-successful-git-branching-model
Driessen's A Successful Git Branching Model
http://nvie.com/posts/a-successful-git-branching-model


future feature develop release hotfixes master

Features for
Tag
future

1.1.35
release Daily

builds

Continuous
Sprint
-defined Tag
merge 1.1.35.1
features

for new release



Tag
1.1.36

Tag
1.37
Development & Integration1
- origin/develop is the default integration branch containing source code with the latest
delivered development changes targeted for the next release. Scheduled nightly builds are
built from this branch using automatic tagging in the format release_number-YYYYMMDD
(e.g. 1.1.38.20170928)
- Only push new code to the develop branch
- Always branch off the develop branch for new features using the branch name format:
feature/Jira-ticket_number (e.g. feature/ILL-788)
- Always merge back ready-for-build code back to the develop branch

Release and Deployment2


- origin/master contains source code that always reflects a production-ready state
- Always branch off the develop branch for every release using the branch name format
release/X.Y.ZZ (e.g. release/1.1.38). release branches support preparation of a new
production release. Minor bug fixes are committed into this branch
- Always merge back ready-for-release code back to the develop and master branches
respectively
- Always build production-ready code from the master branch by tagging the latest release-
to-master merge using the format X.Y.ZZ (e.g. 1.1.38)

Hotfixes3

- Always branch off the master branch for every hotfix release using the branch name format
hotfix/X.Y.ZZ.x (e.g. hotfix/1.1.38.1). hotfix branches are similar to the release
branches in that they are also meant to prepare for a new production release albeit
unplanned. They arise from the necessity to act immediately upon an undesired state of a
live production version. Critical bug fixes to live production code are committed into this
branch
- Always merge back production-ready hotfixes back to the master and develop branches
respectively
- Only build production-ready hotfixes from the master branch by tagging the latest hotfix-
to-master merge

1 http://nvie.com/posts/a-successful-git-branching-model/#the-main-branches

2 http://nvie.com/posts/a-successful-git-branching-model/#release-branches

3 http://nvie.com/posts/a-successful-git-branching-model/#hotfix-branches

Anda mungkin juga menyukai