Git flow - Smart branch management
-
Upload
evans-musomi -
Category
Software
-
view
94 -
download
1
Transcript of Git flow - Smart branch management
Rift Valley Institute website functional specifications
23 September 2013
Git Flowsmart branching model
Evans [email protected]
#git #gitflow #codemanagement
Git Flow - smart branching model
About
• A recommended approach of using git branches in development lifecycle.
• Idea is to standardize branching and merging when
• developing features,
• handling releases and
• managing hot fixes
• Objective is to be consistent and gain advantages of git’s branch development model.
What – Git branching modelFor – Branching strategy and release management
Git Flow - smart branching model
• Keep repository tidier
• Clearer devops (development + operations) procedures
• Move between projects more easily with familiar branch structures
• Get new developers up to speed more quickly
• Less stress during deployment
Note: Of course you can achieve all that Git Flow + SourceTree do for you with git terminal commands. Using the combo affords consistency and is a less error-prone method especially for teams + it’s faster + let’s you free some brain-cycles + memory space :)
Pros: of using Git Flow + SourceTree
Git Flow - smart branching model
Development branch (aka ‘develop’)
• Main development branch where all changes destined for next release are placed
• Directly commit small changes or merge other branches (e.g. feature branches) into this branch
• When code here reaches a stable point and is release-ready, changes should be merged into master
Production branch (aka ‘master’)
• Represents latest release/deployed codebase
• Update only by merging other branches into it
• Should always reflect a production-ready state
• Sometimes called “integration branch” – where any automatic nightly builds are built from
Concept summary: Main Branches
Git Flow - smart branching model
These branches unlike the main ones have limited life time, since they will be removed eventually.
Feature branches
• Create when you start working on anything non-trivial
• When done, merge into develop branch to queue it for next release
Release branches
• Create (from develop branch) when you are about to package a new release. Commit to this during preparation for release.
• When ready to deploy, merge into both develop + master branch
Hotfix branches
• Create (from latest deployed code in master) if you need to patch latest release without including new features from develop
• When done, changes are merged back into both master + develop
Concept summary: Support Branches
Git Flow - smart branching model
Visualization Grand Scheme
Git Flow - smart branching model
• Master is production ready code-base, develop is latest developed code-base.
• Manage features, releases, hot-fixes by using various supporting branches that are then merged into develop and/or master.
• Git Flow enforces the branching concepts described above for you; you don’t need to think about it.
• SourceTree integrates Git Flow seamlessly into its user interface; you don’t need to memorize terminal commands.
Cheers to a successful git branching model :)
Wrap up: take-away points
Git Flow - smart branching model
• Git Flow + Source Tree
http://blog.sourcetreeapp.com/2012/08/01/smart-branching-with-sourcetree-and-git-flow/
• Git Flow Model http://nvie.com/posts/a-successful-git-branching-model/
• Git Flow Cheat Sheet http://danielkummer.github.io/git-flow-cheatsheet/
Reference: #some-useful-resources