SlideShare una empresa de Scribd logo
1 de 13
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

Más contenido relacionado

La actualidad más candente

Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow IntroductionDavid Paluy
 
Git workflows
Git workflowsGit workflows
Git workflowsXpand IT
 
Git Branching – the battle of the ages
Git Branching – the battle of the agesGit Branching – the battle of the ages
Git Branching – the battle of the agesJasmin Fluri
 
Git flow for daily use
Git flow for daily useGit flow for daily use
Git flow for daily useMediacurrent
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requestsBartosz Kosarzycki
 
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 StrategyVivek Parihar
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction TutorialThomas Rausch
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for BeginnersNebulaworks
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash CourseNilay Binjola
 
Git Terminologies
Git TerminologiesGit Terminologies
Git TerminologiesYash
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHubVikram SV
 

La actualidad más candente (20)

Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
 
Git workflows
Git workflowsGit workflows
Git workflows
 
Git Branching – the battle of the ages
Git Branching – the battle of the agesGit Branching – the battle of the ages
Git Branching – the battle of the ages
 
Git flow for daily use
Git flow for daily useGit flow for daily use
Git flow for daily use
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
 
Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
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 Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
 
Git training v10
Git training v10Git training v10
Git training v10
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git workflows
Git workflowsGit workflows
Git workflows
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for Beginners
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Git Terminologies
Git TerminologiesGit Terminologies
Git Terminologies
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 

Destacado

Git branching-model
Git branching-modelGit branching-model
Git branching-modelAaron Huang
 
Git in Continuous Deployment
Git in Continuous DeploymentGit in Continuous Deployment
Git in Continuous DeploymentBrett Child
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git RightSven Peters
 
Git Branching for Agile Teams
Git Branching for Agile TeamsGit Branching for Agile Teams
Git Branching for Agile TeamsSven Peters
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestShawn Jones
 
Reconstructing the past with media wiki
Reconstructing the past with media wikiReconstructing the past with media wiki
Reconstructing the past with media wikiShawn Jones
 
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 HBaseCloudera, 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 DeploymentsDataWorks Summit
 
HBase: Just the Basics
HBase: Just the BasicsHBase: Just the Basics
HBase: Just the BasicsHBaseCon
 
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 DeploymentDan Stine
 
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, ClouderaCloudera, Inc.
 

Destacado (16)

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 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 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 a A successful Git branching model

Git development workflow
Git development workflowGit development workflow
Git development workflowSankar 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 GitMaulik 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 GitMaulik 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 GitRadu Barbu
 
How to use Git Branch
How to use Git BranchHow to use Git Branch
How to use Git BranchPhuoc 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 ModelClarive
 
GitFlow Workshop
GitFlow WorkshopGitFlow Workshop
GitFlow WorkshopSyed Imam
 
Managing releases effectively through git
Managing releases effectively through gitManaging releases effectively through git
Managing releases effectively through gitMohd Farid
 
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 DevelopmentLemi Orhan Ergin
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflowsArthur Shvetsov
 

Similar a 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