SlideShare a Scribd company logo
1 of 13
Download to read offline
Source code management
with GIT
The Gitflow model
The gitflow model is essentially no more than
a set of procedures that every team member
has to follow in order to come to a managed
software development process.
The main branches
At the core, the development model is greatly
inspired by existing models out there.The central
repo holds two main branches with an infinite
lifetime: master and develop.
The master branch at origin should be familiar to
every Git user. Parallel to the master branch, another
branch exists called develop.
We consider origin/master to be the main branch
where the source code of HEAD always reflects a
production-ready state.
The main branches - continued
We consider origin/develop to be the main branch
where the source code of HEAD always reflects a
state with the latest delivered development changes
for the next release. Some would call this the
“integration branch”.This is where any automatic
nightly builds are built from.
When the source code in the develop branch
reaches a stable point and is ready to be released, all
of the changes should be merged back into master
somehow and then tagged with a release number.
How this is done in detail will be discussed further
on.
Therefore, each time when changes are merged back
into master, this is a new production release by
definition.We tend to be very strict at this, so that
theoretically, we could use a Git hook script to
automatically build and roll-out our software to our
production servers everytime there was a commit
on master.
Supporting branches
Next to the main branches master and develop, our development model uses a variety of
supporting branches to aid parallel development between team members, ease tracking of features,
prepare for production releases and to assist in quickly fixing live production problems.
Unlike the main branches, these branches always have a limited life time, since they will be removed
eventually.
The different types of branches we may use are: Feature branches, Release branches and Hotfix
branches
Each of these branches have a specific purpose and are bound to strict rules as to which branches
may be their originating branch and which branches must be their merge targets.We will walk
through them in a minute.
By no means are these branches “special” from a technical perspective.The branch types are
categorized by how we use them.They are of course plain old Git branches.
Feature branches
May branch off from: develop
Must merge back into: develop
Branch naming convention: anything except master, develop, release-*, or
hotfix-*
Feature branches (or sometimes called topic branches) are used to
develop new features for the upcoming or a distant future release.When
starting development of a feature, the target release in which this feature
will be incorporated may well be unknown at that point.The essence of a
feature branch is that it exists as long as the feature is in development,
but will eventually be merged back into develop (to definitely add the
new feature to the upcoming release) or discarded (in case of a
disappointing experiment).
Feature branches typically exist in developer repos only, not in origin.
Release branches
Release branches support preparation of a new production release.They allow for last-minute
dotting of i’s and crossing t’s. Furthermore, they allow for minor bug fixes and preparing meta-data
for a release (version number, build dates, etc.). By doing all of this work on a release branch, the
develop branch is cleared to receive features for the next big release.
May branch off from: develop
Must merge back into: develop and master
Branch naming convention: release-*
Release branches - continued
The key moment to branch off a new release branch from develop is when develop (almost)
reflects the desired state of the new release.At least all features that are targeted for the release-
to-be-built must be merged in to develop at this point in time. All features targeted at future
releases may no — they must wait until after the release branch is branched off.
It is exactly at the start of a release branch that the upcoming release gets assigned a version
number—not any earlier. Up until that moment, the develop branch reflected changes for the “next
release”, but it is unclear whether that “next release” will eventually become 0.3 or 1.0, until the
release branch is started.
That decision is made on the start of the release branch and is carried out by the project’s rules on
version number bumping.
Hotfix branches
May branch off from: master
Must merge back into: develop and master
Branch naming convention: hotfix-*
Hotfix branches are very much like 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.When a critical bug in
a production version must be resolved
immediately, a hotfix branch may be branched
off from the corresponding tag on the master
branch that marks the production version.
The essence is that work of team members
(on the develop branch) can continue, while
another person is preparing a quick
production fix.
Hands-on
demo
Q&A
Thanks! :)
radu.barbu@ownzones.com
Credits
http://nvie.com/posts/a-successful-git-branching-model
https://www.atlassian.com/pt/git/workflows
http://git-scm.com/doc

More Related Content

What's hot

Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?John Congdon
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requestsBartosz Kosarzycki
 
Pull Request (PR): A git workflow
Pull Request (PR): A git workflow Pull Request (PR): A git workflow
Pull Request (PR): A git workflow Joan Yin
 
Understanding Diffs in Git
Understanding Diffs in GitUnderstanding Diffs in Git
Understanding Diffs in Gitgittower
 
Git Flow - An Introduction
Git Flow - An IntroductionGit Flow - An Introduction
Git Flow - An IntroductionKnoldus Inc.
 
CoDe:U Git Flow
CoDe:U Git FlowCoDe:U Git Flow
CoDe:U Git FlowLars Kruse
 
SemVer, the whole story
SemVer, the whole storySemVer, the whole story
SemVer, the whole storyJakeGinnivan
 
Semantic Versioning with GitVersion
Semantic Versioning with GitVersionSemantic Versioning with GitVersion
Semantic Versioning with GitVersionGary Park
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentationMack Hardy
 
Introduction to git flow
Introduction to git flowIntroduction to git flow
Introduction to git flowKnoldus Inc.
 
Branching and merging strategy
Branching and merging strategyBranching and merging strategy
Branching and merging strategyRahul Janghel
 
Continuous integration 101
Continuous integration 101Continuous integration 101
Continuous integration 101Gary Park
 
Semantic Versioning with GitVersion - Take 2
Semantic Versioning with GitVersion - Take 2Semantic Versioning with GitVersion - Take 2
Semantic Versioning with GitVersion - Take 2Gary Park
 
The Different Versions of Dot NET
The Different Versions of Dot NETThe Different Versions of Dot NET
The Different Versions of Dot NETAlvin Gom
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review changeGit Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review changemsohn
 
Developer Ignite Scott Cate Versioning
Developer Ignite Scott Cate VersioningDeveloper Ignite Scott Cate Versioning
Developer Ignite Scott Cate VersioningScott Cate
 
Clouds & Containers: Hit the High Points and Give it to Me Straight, What's t...
Clouds & Containers: Hit the High Points and Give it to Me Straight, What's t...Clouds & Containers: Hit the High Points and Give it to Me Straight, What's t...
Clouds & Containers: Hit the High Points and Give it to Me Straight, What's t...Mark Heckler
 

What's hot (20)

Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
 
Pull Request (PR): A git workflow
Pull Request (PR): A git workflow Pull Request (PR): A git workflow
Pull Request (PR): A git workflow
 
My Git workflow
My Git workflowMy Git workflow
My Git workflow
 
Git flow
Git flowGit flow
Git flow
 
Understanding Diffs in Git
Understanding Diffs in GitUnderstanding Diffs in Git
Understanding Diffs in Git
 
Git Flow - An Introduction
Git Flow - An IntroductionGit Flow - An Introduction
Git Flow - An Introduction
 
CoDe:U Git Flow
CoDe:U Git FlowCoDe:U Git Flow
CoDe:U Git Flow
 
SemVer, the whole story
SemVer, the whole storySemVer, the whole story
SemVer, the whole story
 
Semantic Versioning with GitVersion
Semantic Versioning with GitVersionSemantic Versioning with GitVersion
Semantic Versioning with GitVersion
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 
Introduction to git flow
Introduction to git flowIntroduction to git flow
Introduction to git flow
 
Branching and merging strategy
Branching and merging strategyBranching and merging strategy
Branching and merging strategy
 
Git work flow
Git work flowGit work flow
Git work flow
 
Continuous integration 101
Continuous integration 101Continuous integration 101
Continuous integration 101
 
Semantic Versioning with GitVersion - Take 2
Semantic Versioning with GitVersion - Take 2Semantic Versioning with GitVersion - Take 2
Semantic Versioning with GitVersion - Take 2
 
The Different Versions of Dot NET
The Different Versions of Dot NETThe Different Versions of Dot NET
The Different Versions of Dot NET
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review changeGit Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
 
Developer Ignite Scott Cate Versioning
Developer Ignite Scott Cate VersioningDeveloper Ignite Scott Cate Versioning
Developer Ignite Scott Cate Versioning
 
Clouds & Containers: Hit the High Points and Give it to Me Straight, What's t...
Clouds & Containers: Hit the High Points and Give it to Me Straight, What's t...Clouds & Containers: Hit the High Points and Give it to Me Straight, What's t...
Clouds & Containers: Hit the High Points and Give it to Me Straight, What's t...
 

Similar to Gitflow model for source code management

How to use Git Branch
How to use Git BranchHow to use Git Branch
How to use Git BranchPhuoc Nguyen
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model abodeltae
 
CS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdfCS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdfalbusfons939393
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow Sebin Benjamin
 
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 usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)Yeasin Abedin
 
Git basics a starter on git and its ecosystem
Git basics  a starter on git and its ecosystemGit basics  a starter on git and its ecosystem
Git basics a starter on git and its ecosystemFrançois D'Agostini
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for developmentGerrit Wanderer
 
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTree
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTreeManaging software product versioning with Gitflow, VSTS and Atlassian SourceTree
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTreeBosnia Agile
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowMikhail Melnik
 
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
 
Session: Git Basics & GitFlow Workflow
Session: Git Basics & GitFlow WorkflowSession: Git Basics & GitFlow Workflow
Session: Git Basics & GitFlow WorkflowMidhun Mohanan
 
Git Workflows
Git WorkflowsGit Workflows
Git WorkflowsNoam Kfir
 
GITFlow definition for all software projects
GITFlow definition for all software projectsGITFlow definition for all software projects
GITFlow definition for all software projectsThierry Gayet
 

Similar to Gitflow model for source code management (20)

Introduction to Git (part 3)
Introduction to Git (part 3)Introduction to Git (part 3)
Introduction to Git (part 3)
 
How to use Git Branch
How to use Git BranchHow to use Git Branch
How to use Git Branch
 
Gitflow Workflow
Gitflow WorkflowGitflow Workflow
Gitflow Workflow
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
 
CS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdfCS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdf
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing 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 usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
 
Git basics a starter on git and its ecosystem
Git basics  a starter on git and its ecosystemGit basics  a starter on git and its ecosystem
Git basics a starter on git and its ecosystem
 
Git
GitGit
Git
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for development
 
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTree
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTreeManaging software product versioning with Gitflow, VSTS and Atlassian SourceTree
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTree
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
 
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
 
git Technologies
git Technologiesgit Technologies
git Technologies
 
Session: Git Basics & GitFlow Workflow
Session: Git Basics & GitFlow WorkflowSession: Git Basics & GitFlow Workflow
Session: Git Basics & GitFlow Workflow
 
Git Workflows
Git WorkflowsGit Workflows
Git Workflows
 
Git collaboration
Git collaborationGit collaboration
Git collaboration
 
GITFlow definition for all software projects
GITFlow definition for all software projectsGITFlow definition for all software projects
GITFlow definition for all software projects
 

Recently uploaded

Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 

Recently uploaded (20)

Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 

Gitflow model for source code management

  • 2. The Gitflow model The gitflow model is essentially no more than a set of procedures that every team member has to follow in order to come to a managed software development process.
  • 3. The main branches At the core, the development model is greatly inspired by existing models out there.The central repo holds two main branches with an infinite lifetime: master and develop. The master branch at origin should be familiar to every Git user. Parallel to the master branch, another branch exists called develop. We consider origin/master to be the main branch where the source code of HEAD always reflects a production-ready state.
  • 4. The main branches - continued We consider origin/develop to be the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release. Some would call this the “integration branch”.This is where any automatic nightly builds are built from. When the source code in the develop branch reaches a stable point and is ready to be released, all of the changes should be merged back into master somehow and then tagged with a release number. How this is done in detail will be discussed further on. Therefore, each time when changes are merged back into master, this is a new production release by definition.We tend to be very strict at this, so that theoretically, we could use a Git hook script to automatically build and roll-out our software to our production servers everytime there was a commit on master.
  • 5. Supporting branches Next to the main branches master and develop, our development model uses a variety of supporting branches to aid parallel development between team members, ease tracking of features, prepare for production releases and to assist in quickly fixing live production problems. Unlike the main branches, these branches always have a limited life time, since they will be removed eventually. The different types of branches we may use are: Feature branches, Release branches and Hotfix branches Each of these branches have a specific purpose and are bound to strict rules as to which branches may be their originating branch and which branches must be their merge targets.We will walk through them in a minute. By no means are these branches “special” from a technical perspective.The branch types are categorized by how we use them.They are of course plain old Git branches.
  • 6. Feature branches May branch off from: develop Must merge back into: develop Branch naming convention: anything except master, develop, release-*, or hotfix-* Feature branches (or sometimes called topic branches) are used to develop new features for the upcoming or a distant future release.When starting development of a feature, the target release in which this feature will be incorporated may well be unknown at that point.The essence of a feature branch is that it exists as long as the feature is in development, but will eventually be merged back into develop (to definitely add the new feature to the upcoming release) or discarded (in case of a disappointing experiment). Feature branches typically exist in developer repos only, not in origin.
  • 7. Release branches Release branches support preparation of a new production release.They allow for last-minute dotting of i’s and crossing t’s. Furthermore, they allow for minor bug fixes and preparing meta-data for a release (version number, build dates, etc.). By doing all of this work on a release branch, the develop branch is cleared to receive features for the next big release. May branch off from: develop Must merge back into: develop and master Branch naming convention: release-*
  • 8. Release branches - continued The key moment to branch off a new release branch from develop is when develop (almost) reflects the desired state of the new release.At least all features that are targeted for the release- to-be-built must be merged in to develop at this point in time. All features targeted at future releases may no — they must wait until after the release branch is branched off. It is exactly at the start of a release branch that the upcoming release gets assigned a version number—not any earlier. Up until that moment, the develop branch reflected changes for the “next release”, but it is unclear whether that “next release” will eventually become 0.3 or 1.0, until the release branch is started. That decision is made on the start of the release branch and is carried out by the project’s rules on version number bumping.
  • 9. Hotfix branches May branch off from: master Must merge back into: develop and master Branch naming convention: hotfix-* Hotfix branches are very much like 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.When a critical bug in a production version must be resolved immediately, a hotfix branch may be branched off from the corresponding tag on the master branch that marks the production version. The essence is that work of team members (on the develop branch) can continue, while another person is preparing a quick production fix.
  • 11. Q&A