SlideShare a Scribd company logo
2
Most read
6
Most read
9
Most read
Vivek Parihar
➔ I’m a Serial Entrepreneur(Co-founded 2 startups)
Currently serves as VP oF Engineering at
XOXODay
➔ Ex-Head’s Engineering for Mobile @ Yatra's all
verticals.
➔ A Polyglot Engineer*.
Big fan of The Law of “T”
➔ A staunch supporter of Open Source.
➔ Public Speaker
➔ A mad Geek and an Explorer.
When not scaling the applications or servers of the
Internet world, I ‘unwinds’ on extreme
thrill-seeking adventures from trekking to boxing.
Get in touch with me:
LinkedIn:https://in.linkedin.com/in/pariharvivek
Twitter: @vparihar
About Me
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
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
● Hotfix 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.
The essence of a feature branch is that it exists as long as the feature is in development
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
Feature branches
Creating a feature branch
When starting work on a new feature, branch off from the develop branch.
$ git checkout -b myfeature develop
Switched to a new branch "myfeature"
Incorporating a finished feature on develop
Finished features may be merged into the develop branch to definitely add them to the upcoming release:
$ git checkout develop
Switched to branch 'develop'
$ git merge --no-ff myfeature
Updating ea1b82a..05e9557
(Summary of changes)
$ git branch -d myfeature
Deleted branch myfeature (was 05e9557).
$ git push origin develop
The --no-ff flag causes the merge to always create a new
commit object, even if the merge could be performed with a
fast-forward.
In the latter case, it is impossible to see from the Git history
which of the commit objects together have implemented a
feature—you would have to manually read all the log
messages. Reverting a whole feature (i.e. a group of commits),
is a true headache in the latter situation, whereas it is easily
done if the --no-ff flag was used.
Release branches
May branch off from:
develop
Must merge back into:
develop and master
Branch naming convention:
release-*
A Git Workflow Model or Branching Strategy
Creating a release branch
$ git checkout -b release-1.2 develop
Switched to a new branch "release-1.2"
$ git commit -a -m "Bumped version number to 1.2"
[release-1.2 74d9424] Bumped version number to 1.2
1 files changed, 1 insertions(+), 1 deletions(-)
Finishing a release branch
The first two steps in Git:
$ git checkout master
Switched to branch 'master'
$ git merge --no-ff release-1.2 The release is now done, and tagged for future reference.
Merge made by recursive.
(Summary of changes)
$ git tag -a 1.2
To keep the changes made in the release branch, we need to merge those back into develop, though.
$ git checkout develop
Switched to branch 'develop'
$ git merge --no-ff release-1.2
Merge made by recursive.
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.
A hotfix branch may be branched off from the corresponding tag on the
master branch that marks the production version to fix a critical bug in a
production
Other team members (on the develop branch) can continue, while another
person is preparing a quick production fix.
Hotfix branches
Creating the hotfix branch
$ git checkout -b hotfix-1.2.1 master
Switched to a new branch "hotfix-1.2.1"
$ git commit -a -m "Bumped version number to 1.2.1"
[hotfix-1.2.1 41e61bb] Bumped version number to 1.2.1
1 files changed, 1 insertions(+), 1 deletions(-)
Then, fix the bug and commit the fix in one or more separate commits.
$ git commit -m "Fixed severe production problem"
[hotfix-1.2.1 abbe5d6] Fixed severe production problem
5 files changed, 32 insertions(+), 17 deletions(-)
Finishing a hotfix branch
First, update master and tag the release.
$ git checkout master
Switched to branch 'master'
$ git merge --no-ff hotfix-1.2.1
Merge made by recursive.
(Summary of changes)
$ git tag -a 1.2.1
Next, include the bugfix in develop, too:
$ git checkout develop
Switched to branch 'develop'
$ git merge --no-ff hotfix-1.2.1
Merge made by recursive.
(Summary of changes)
The one exception to the rule here is
that, when a release branch currently
exists, the hotfix changes need to be
merged into that release branch,
instead of develop
Summary
The overall flow of Gitflow is:
● A develop branch is created from master
● A release branch is created from develop
● Feature branches are created from develop
● When a feature is complete it is merged into the develop branch
● When the release branch is done it is merged into develop and master
● If an issue in master is detected a hotfix branch is created from master
● Once the hotfix is complete it is merged to both develop and master
Thank you!
Vivek Parihar

More Related Content

PPTX
Git branching strategies
PPTX
DevOps 101 - an Introduction to DevOps
PDF
Jenkins
PPTX
SonarQube Presentation.pptx
PPTX
Firebase Analytics
PPTX
AWS Lambda Tutorial For Beginners | What is AWS Lambda? | AWS Tutorial For Be...
PDF
Git flow Introduction
PDF
Annual Operating Strategy PowerPoint Presentation Slides
Git branching strategies
DevOps 101 - an Introduction to DevOps
Jenkins
SonarQube Presentation.pptx
Firebase Analytics
AWS Lambda Tutorial For Beginners | What is AWS Lambda? | AWS Tutorial For Be...
Git flow Introduction
Annual Operating Strategy PowerPoint Presentation Slides

What's hot (20)

PDF
Git and github 101
PDF
Git Series. Episode 3. Git Flow and Github-Flow
PPTX
A successful Git branching model
PDF
Git Branching Model
PPTX
Git - Basic Crash Course
PPTX
Git and GitFlow branching model
PDF
Git - An Introduction
PDF
Git Branching Model
PDF
Git and git flow
PDF
git and github
PDF
Introducing GitLab (September 2018)
PPTX
Branching and Merging Practices
PDF
Git-flow workflow and pull-requests
PPTX
Introduction to Gitlab | Gitlab 101 | Training Session
PPTX
Git and GitHub
PDF
Gitlab flow solo
PDF
Git flow for daily use
PDF
Git Branching for Agile Teams
PPTX
Git in 10 minutes
PPTX
Git Branch
Git and github 101
Git Series. Episode 3. Git Flow and Github-Flow
A successful Git branching model
Git Branching Model
Git - Basic Crash Course
Git and GitFlow branching model
Git - An Introduction
Git Branching Model
Git and git flow
git and github
Introducing GitLab (September 2018)
Branching and Merging Practices
Git-flow workflow and pull-requests
Introduction to Gitlab | Gitlab 101 | Training Session
Git and GitHub
Gitlab flow solo
Git flow for daily use
Git Branching for Agile Teams
Git in 10 minutes
Git Branch
Ad

Similar to A Git Workflow Model or Branching Strategy (20)

PPTX
Gitflow - Branching and Merging Flow for Git
PPTX
Gitflow - Branching and Merging Flow for Git
PPTX
Git development workflow
PPTX
Gitflow
PDF
Introduction to Git (part 3)
PDF
Introducing Git and git flow
PDF
Clarive 7 Branching Model
PDF
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
PDF
Gitflow Workflow
PDF
Source code management with Git
PDF
Git and Git Workflow Models as Catalysts of Software Development
PDF
Take the next step with git
PPTX
Git workflows
PPTX
Git flow
PDF
Git and GitHub workflows
PPTX
How to use Git Branch
PDF
Managing releases effectively through git
PPTX
Gitflow - Una metología para manejo de Branches
PDF
Switching to Git
PPTX
GitFlow Workshop
Gitflow - Branching and Merging Flow for Git
Gitflow - Branching and Merging Flow for Git
Git development workflow
Gitflow
Introduction to Git (part 3)
Introducing Git and git flow
Clarive 7 Branching Model
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Gitflow Workflow
Source code management with Git
Git and Git Workflow Models as Catalysts of Software Development
Take the next step with git
Git workflows
Git flow
Git and GitHub workflows
How to use Git Branch
Managing releases effectively through git
Gitflow - Una metología para manejo de Branches
Switching to Git
GitFlow Workshop
Ad

More from Vivek Parihar (11)

PDF
Programming languages and concepts by vivek parihar
PDF
Case Study to build a tablet based app that is a shopping assistant.
PDF
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
PDF
Devops for beginners
PDF
How fast can you onboard a new team member with VAGRANT ?
PDF
Centralized logging system using mongoDB
PDF
Mobile First Approach - The key to cross platform interface design
PDF
10 Deployments a day - A brief on extreme release protocols
PDF
MongoDb scalability and high availability with Replica-Set
PDF
Cloud foundry presentation
PDF
Hu mongous db v2
Programming languages and concepts by vivek parihar
Case Study to build a tablet based app that is a shopping assistant.
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Devops for beginners
How fast can you onboard a new team member with VAGRANT ?
Centralized logging system using mongoDB
Mobile First Approach - The key to cross platform interface design
10 Deployments a day - A brief on extreme release protocols
MongoDb scalability and high availability with Replica-Set
Cloud foundry presentation
Hu mongous db v2

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Machine learning based COVID-19 study performance prediction
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation theory and applications.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Cloud computing and distributed systems.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Modernizing your data center with Dell and AMD
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
A Presentation on Artificial Intelligence
Machine learning based COVID-19 study performance prediction
Chapter 3 Spatial Domain Image Processing.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Network Security Unit 5.pdf for BCA BBA.
Encapsulation theory and applications.pdf
Unlocking AI with Model Context Protocol (MCP)
Cloud computing and distributed systems.
Building Integrated photovoltaic BIPV_UPV.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Digital-Transformation-Roadmap-for-Companies.pptx
Modernizing your data center with Dell and AMD
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Dropbox Q2 2025 Financial Results & Investor Presentation
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

A Git Workflow Model or Branching Strategy

  • 2. ➔ I’m a Serial Entrepreneur(Co-founded 2 startups) Currently serves as VP oF Engineering at XOXODay ➔ Ex-Head’s Engineering for Mobile @ Yatra's all verticals. ➔ A Polyglot Engineer*. Big fan of The Law of “T” ➔ A staunch supporter of Open Source. ➔ Public Speaker ➔ A mad Geek and an Explorer. When not scaling the applications or servers of the Internet world, I ‘unwinds’ on extreme thrill-seeking adventures from trekking to boxing. Get in touch with me: LinkedIn:https://in.linkedin.com/in/pariharvivek Twitter: @vparihar About Me
  • 6. 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 ● Hotfix branches
  • 7. 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. The essence of a feature branch is that it exists as long as the feature is in development 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 Feature branches
  • 8. Creating a feature branch When starting work on a new feature, branch off from the develop branch. $ git checkout -b myfeature develop Switched to a new branch "myfeature" Incorporating a finished feature on develop Finished features may be merged into the develop branch to definitely add them to the upcoming release: $ git checkout develop Switched to branch 'develop' $ git merge --no-ff myfeature Updating ea1b82a..05e9557 (Summary of changes) $ git branch -d myfeature Deleted branch myfeature (was 05e9557). $ git push origin develop
  • 9. The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. In the latter case, it is impossible to see from the Git history which of the commit objects together have implemented a feature—you would have to manually read all the log messages. Reverting a whole feature (i.e. a group of commits), is a true headache in the latter situation, whereas it is easily done if the --no-ff flag was used.
  • 10. Release branches May branch off from: develop Must merge back into: develop and master Branch naming convention: release-*
  • 12. Creating a release branch $ git checkout -b release-1.2 develop Switched to a new branch "release-1.2" $ git commit -a -m "Bumped version number to 1.2" [release-1.2 74d9424] Bumped version number to 1.2 1 files changed, 1 insertions(+), 1 deletions(-) Finishing a release branch The first two steps in Git: $ git checkout master Switched to branch 'master' $ git merge --no-ff release-1.2 The release is now done, and tagged for future reference. Merge made by recursive. (Summary of changes) $ git tag -a 1.2 To keep the changes made in the release branch, we need to merge those back into develop, though. $ git checkout develop Switched to branch 'develop' $ git merge --no-ff release-1.2 Merge made by recursive.
  • 13. 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. A hotfix branch may be branched off from the corresponding tag on the master branch that marks the production version to fix a critical bug in a production Other team members (on the develop branch) can continue, while another person is preparing a quick production fix. Hotfix branches
  • 14. Creating the hotfix branch $ git checkout -b hotfix-1.2.1 master Switched to a new branch "hotfix-1.2.1" $ git commit -a -m "Bumped version number to 1.2.1" [hotfix-1.2.1 41e61bb] Bumped version number to 1.2.1 1 files changed, 1 insertions(+), 1 deletions(-) Then, fix the bug and commit the fix in one or more separate commits. $ git commit -m "Fixed severe production problem" [hotfix-1.2.1 abbe5d6] Fixed severe production problem 5 files changed, 32 insertions(+), 17 deletions(-)
  • 15. Finishing a hotfix branch First, update master and tag the release. $ git checkout master Switched to branch 'master' $ git merge --no-ff hotfix-1.2.1 Merge made by recursive. (Summary of changes) $ git tag -a 1.2.1 Next, include the bugfix in develop, too: $ git checkout develop Switched to branch 'develop' $ git merge --no-ff hotfix-1.2.1 Merge made by recursive. (Summary of changes) The one exception to the rule here is that, when a release branch currently exists, the hotfix changes need to be merged into that release branch, instead of develop
  • 16. Summary The overall flow of Gitflow is: ● A develop branch is created from master ● A release branch is created from develop ● Feature branches are created from develop ● When a feature is complete it is merged into the develop branch ● When the release branch is done it is merged into develop and master ● If an issue in master is detected a hotfix branch is created from master ● Once the hotfix is complete it is merged to both develop and master