SlideShare a Scribd company logo
A successful Git branching
model
For a smooth and non conflicting development experience
The Problem
- Multiple member working on different parts unnecessarily delaying each
other.
- Cant release urgent changes because there are uncomplete features in the
code .
- Inability to isolate features for testing.
- Inability to revert a specific feature without reverting other features or code
changes.
- A lot of time wasted on merge conflicts.
The Goal
- Focus on a specific target while developing.
- Be able to apply urgent changes
- Isolate features for testing.
- Flexibility and ability to revert features or code parts without affecting other
parts.
- Ability to work on features for distant releases.
- Reduce merge conflict time.
The model
Main Branches
- Master Branch
- Develop Branch
Support Branches
- Feature branches
- Release branches
- Hotfix branches
Main Branches
- These Branches will always be there and live as
long as the project lives
- Master should always reflect a production-ready
state.
- Develop reflects a state with the latest delivered
development changes for the next release
Support Branches - Feature
Feature branch is used to develop a new feature for the next or a distant
release.
May branch off from : develop
Must merge back into : develop
Branch naming convention:
anything except :
master,develop, release-*, or hotfix-*
Support Branches - Feature
Create a feature branch from the develop branch
Implement the feature .
When done , merge back into develop branch
$ git checkout -b myfeature develop
// do the coding
$ git checkout develop
$ git merge --no-ff myfeature
$ git branch -d myfeature
$ git push origin develop
Support Branches - Release
- Should be created once ready or almost done for a new release.
- no new features should be added here
- Clears space for other team members to work on new features from the
development branch.
- Changes on this branch should be done to solve bugs found before release
- Metadata , version number ,build data , etc...
May branch off from : develop
Must merge back into : develop and master
Branch naming convention : release-*
Support Branches - Release
- Create a release branch from the develop
branch.
- Update release metadata.
- Solve any found bugs.
- When done , merge into develop branch and
release branch
- Give a tag on the master branch
- Delete the branch
$ git checkout -b release-1.2 develop
// do the coding
$ git commit -a -m "updated version
number”
$ 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
Support Branches - Hotfix
- Hotfix branches are created when it’s
needed to apply urgent changes or
hotfixes for bugs detected on the
production that can’t wait for the next
release.
- Its behaviour is very similar to a release
branch because it eventually creates a
new release.
May branch off from : master
Must merge back into : develop and master
Branch naming convention : hotfix-*
Support Branches - Hotfix
- Create a hotfix branch from the develop branch.
- Update version.
- Solve any found bugs.
- When done , merge into develop branch and
release branch
- Give a tag on the master branch
- Delete the branch
$ git checkout -b hotfix-1.2.1 master
// apply hotfix and update version number and
metadata etc..
$ git commit -m "Fixed severe production
problem"
$ 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
The Big Picture
Thank you

More Related Content

What's hot

Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
Mack Hardy
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
Bartosz Kosarzycki
 
Git training v10
Git training v10Git training v10
Git training v10
Skander Hamza
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
Vivek Parihar
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
Fran García
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
Arulmurugan Rajaraman
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
 
Git flow
Git flowGit flow
Git flow
Valerio Como
 
Git workflows
Git workflowsGit workflows
Git workflowsXpand IT
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Yan Vugenfirer
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
Taisuke Inoue
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)
Noa Harel
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
Senthilkumar Gopal
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
Venkat Malladi
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagrams
Dilum Navanjana
 
Git Branch
Git BranchGit Branch
Git Branch
Wei-Tsung Su
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
Nicolás Tourné
 
Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
Otto Kekäläinen
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 

What's hot (20)

Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
 
Git training v10
Git training v10Git training v10
Git training v10
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Git flow
Git flowGit flow
Git flow
 
Git workflows
Git workflowsGit workflows
Git workflows
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagrams
 
Git
GitGit
Git
 
Git Branch
Git BranchGit Branch
Git Branch
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 

Viewers also liked

Git branching-model
Git branching-modelGit branching-model
Git branching-model
Aaron Huang
 
Git in Continuous Deployment
Git in Continuous DeploymentGit in Continuous Deployment
Git in Continuous Deployment
Brett Child
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
Sven Peters
 
Git Branching for Agile Teams
Git Branching for Agile TeamsGit Branching for Agile Teams
Git Branching for Agile Teams
Sven Peters
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonest
Shawn Jones
 
Reconstructing the past with media wiki
Reconstructing the past with media wikiReconstructing the past with media wiki
Reconstructing the past with media wiki
Shawn Jones
 
Git flow for daily use
Git flow for daily useGit flow for daily use
Git flow for daily useMediacurrent
 
Git Workflow With Gitflow
Git Workflow With GitflowGit Workflow With Gitflow
Git Workflow With GitflowJosh Dvir
 
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
DataWorks Summit/Hadoop Summit
 
A successful git branching model 導讀
A successful git branching model 導讀A successful git branching model 導讀
A successful git branching model 導讀
Wen Liao
 
Apache Hadoop and HBase
Apache Hadoop and HBaseApache Hadoop and HBase
Apache Hadoop and HBase
Cloudera, Inc.
 
Multi-tenant, Multi-cluster and Multi-container Apache HBase Deployments
Multi-tenant, Multi-cluster and Multi-container Apache HBase DeploymentsMulti-tenant, Multi-cluster and Multi-container Apache HBase Deployments
Multi-tenant, Multi-cluster and Multi-container Apache HBase Deployments
DataWorks Summit
 
HBase: Just the Basics
HBase: Just the BasicsHBase: Just the Basics
HBase: Just the Basics
HBaseCon
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated Deployment
Dan Stine
 
Getting Git
Getting GitGetting Git
Getting Git
Scott Chacon
 
git flow
git flowgit flow
HBaseCon 2012 | HBase Filtering - Lars George, Cloudera
HBaseCon 2012 | HBase Filtering - Lars George, ClouderaHBaseCon 2012 | HBase Filtering - Lars George, Cloudera
HBaseCon 2012 | HBase Filtering - Lars George, Cloudera
Cloudera, Inc.
 

Viewers also liked (18)

Git branching-model
Git branching-modelGit branching-model
Git branching-model
 
Git in Continuous Deployment
Git in Continuous DeploymentGit in Continuous Deployment
Git in Continuous Deployment
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
 
Git Branching for Agile Teams
Git Branching for Agile TeamsGit Branching for Agile Teams
Git Branching for Agile Teams
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonest
 
Reconstructing the past with media wiki
Reconstructing the past with media wikiReconstructing the past with media wiki
Reconstructing the past with media wiki
 
Git flow for daily use
Git flow for daily useGit flow for daily use
Git flow for daily use
 
Git Workflow With Gitflow
Git Workflow With GitflowGit Workflow With Gitflow
Git Workflow With Gitflow
 
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
 
A successful git branching model 導讀
A successful git branching model 導讀A successful git branching model 導讀
A successful git branching model 導讀
 
Apache Hadoop and HBase
Apache Hadoop and HBaseApache Hadoop and HBase
Apache Hadoop and HBase
 
Multi-tenant, Multi-cluster and Multi-container Apache HBase Deployments
Multi-tenant, Multi-cluster and Multi-container Apache HBase DeploymentsMulti-tenant, Multi-cluster and Multi-container Apache HBase Deployments
Multi-tenant, Multi-cluster and Multi-container Apache HBase Deployments
 
HBase: Just the Basics
HBase: Just the BasicsHBase: Just the Basics
HBase: Just the Basics
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated Deployment
 
Getting Git
Getting GitGetting Git
Getting Git
 
Git workflows
Git workflowsGit workflows
Git workflows
 
git flow
git flowgit flow
git flow
 
HBaseCon 2012 | HBase Filtering - Lars George, Cloudera
HBaseCon 2012 | HBase Filtering - Lars George, ClouderaHBaseCon 2012 | HBase Filtering - Lars George, Cloudera
HBaseCon 2012 | HBase Filtering - Lars George, Cloudera
 

Similar to A successful Git branching model

Git development workflow
Git development workflowGit development workflow
Git development workflow
Sankar Suda
 
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for GitGitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
Maulik Shah
 
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for GitGitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
Maulik Shah
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for developmentGerrit Wanderer
 
Source code management with Git
Source code management with GitSource code management with Git
Source code management with Git
Radu Barbu
 
Git collaboration
Git collaborationGit collaboration
Git collaboration
Pham Quy (Jack)
 
How to use Git Branch
How to use Git BranchHow to use Git Branch
How to use Git Branch
Phuoc Nguyen
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
Sebin Benjamin
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced gitGerrit Wanderer
 
Clarive 7 Branching Model
Clarive 7 Branching ModelClarive 7 Branching Model
Clarive 7 Branching Model
Clarive
 
GitFlow Workshop
GitFlow WorkshopGitFlow Workshop
GitFlow Workshop
Syed Imam
 
Managing releases effectively through git
Managing releases effectively through gitManaging releases effectively through git
Managing releases effectively through git
Mohd Farid
 
Gitflow Workflow
Gitflow WorkflowGitflow Workflow
Gitflow Workflow
Hean Hong Leong
 
Git workflows
Git workflowsGit workflows
Git workflows
Thuc Le Dong
 
Git and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentGit and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software Development
Lemi Orhan Ergin
 
Git more done
Git more doneGit more done
Git more done
Kwen Peterson
 
Gitflow
GitflowGitflow
Gitflow
Phuoc Bui
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
Arthur Shvetsov
 
git Technologies
git Technologiesgit Technologies
git Technologies
Hirantha Pradeep
 

Similar to A successful Git branching model (20)

Git development workflow
Git development workflowGit development workflow
Git development workflow
 
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for GitGitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
 
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for GitGitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for development
 
Source code management with Git
Source code management with GitSource code management with Git
Source code management with Git
 
Git collaboration
Git collaborationGit collaboration
Git collaboration
 
How to use Git Branch
How to use Git BranchHow to use Git Branch
How to use Git Branch
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
Git flow
Git flowGit flow
Git flow
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
 
Clarive 7 Branching Model
Clarive 7 Branching ModelClarive 7 Branching Model
Clarive 7 Branching Model
 
GitFlow Workshop
GitFlow WorkshopGitFlow Workshop
GitFlow Workshop
 
Managing releases effectively through git
Managing releases effectively through gitManaging releases effectively through git
Managing releases effectively through git
 
Gitflow Workflow
Gitflow WorkflowGitflow Workflow
Gitflow Workflow
 
Git workflows
Git workflowsGit workflows
Git workflows
 
Git and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentGit and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software Development
 
Git more done
Git more doneGit more done
Git more done
 
Gitflow
GitflowGitflow
Gitflow
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
 
git Technologies
git Technologiesgit Technologies
git Technologies
 

A successful Git branching model

  • 1. A successful Git branching model For a smooth and non conflicting development experience
  • 2. The Problem - Multiple member working on different parts unnecessarily delaying each other. - Cant release urgent changes because there are uncomplete features in the code . - Inability to isolate features for testing. - Inability to revert a specific feature without reverting other features or code changes. - A lot of time wasted on merge conflicts.
  • 3. The Goal - Focus on a specific target while developing. - Be able to apply urgent changes - Isolate features for testing. - Flexibility and ability to revert features or code parts without affecting other parts. - Ability to work on features for distant releases. - Reduce merge conflict time.
  • 4. The model Main Branches - Master Branch - Develop Branch Support Branches - Feature branches - Release branches - Hotfix branches
  • 5. Main Branches - These Branches will always be there and live as long as the project lives - Master should always reflect a production-ready state. - Develop reflects a state with the latest delivered development changes for the next release
  • 6. Support Branches - Feature Feature branch is used to develop a new feature for the next or a distant release. May branch off from : develop Must merge back into : develop Branch naming convention: anything except : master,develop, release-*, or hotfix-*
  • 7. Support Branches - Feature Create a feature branch from the develop branch Implement the feature . When done , merge back into develop branch $ git checkout -b myfeature develop // do the coding $ git checkout develop $ git merge --no-ff myfeature $ git branch -d myfeature $ git push origin develop
  • 8. Support Branches - Release - Should be created once ready or almost done for a new release. - no new features should be added here - Clears space for other team members to work on new features from the development branch. - Changes on this branch should be done to solve bugs found before release - Metadata , version number ,build data , etc... May branch off from : develop Must merge back into : develop and master Branch naming convention : release-*
  • 9. Support Branches - Release - Create a release branch from the develop branch. - Update release metadata. - Solve any found bugs. - When done , merge into develop branch and release branch - Give a tag on the master branch - Delete the branch $ git checkout -b release-1.2 develop // do the coding $ git commit -a -m "updated version number” $ 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
  • 10. Support Branches - Hotfix - Hotfix branches are created when it’s needed to apply urgent changes or hotfixes for bugs detected on the production that can’t wait for the next release. - Its behaviour is very similar to a release branch because it eventually creates a new release. May branch off from : master Must merge back into : develop and master Branch naming convention : hotfix-*
  • 11. Support Branches - Hotfix - Create a hotfix branch from the develop branch. - Update version. - Solve any found bugs. - When done , merge into develop branch and release branch - Give a tag on the master branch - Delete the branch $ git checkout -b hotfix-1.2.1 master // apply hotfix and update version number and metadata etc.. $ git commit -m "Fixed severe production problem" $ 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