SlideShare a Scribd company logo
Managing releases effectively through Git
- By Mohd Farid
Agenda
● Git branching support
● Why branching strategy?
● Introducing git-flow
● Different branches for different purposes
● Different Workfows while using git-flow
Git branching support
● Git allows us to create multiple branches.
● Merge any branch into another.
● Pull changes from any branch to any branch.
Note: With great power comes great responsibilities
Why do I need a branching
strategy?
Git branching strategy - Why it is important ?
Frequent overwriting of my commits by this guy.
Git branching strategy - Why it is important ?
Difficult to debug what went wrong from the clumsy tree
structure.
Git branching strategy - Why it is important ?
Situation goes out of control: We call the experts …
and they do things like..
git reset HEAD
git reset HARD
and .. evil
Our hearts start beating faster and faster… with each
command they type !!!
Git branching strategy - Why it is important ?
We always have a stable branch ready to be deployed to
production.
But before we solve it, lets see,
how things go wrong…
The good, The bad and the ugly
The Good - Single developer days
The Bad - Two developers on the project
The Ugly - Multiple developer days..
It definitely needs a genius (+ time) to decipher this tree.
What is the way out from this
….. life ?
Lets meet a branching strategy.. Git-flow
Git-flow is a way to manage our code such that:
● There are no code overrides by my colleague.
● If something goes wrong, I can easily figure out which
commit failed by referring to a very simple tree.
Lets meet a branching strategy.. Git-flow
Ques:
Do I need to learn new set of commands for this
Ans:
NO, We just need to be follow a simple process and
everything will fall in place.
Most frequently used commands
git pull origin development
git checkout -b branchName
git commit -am “Commit message”
git merge --no-ff feature-branch
git rebase
git branch -d
git push origin development
What is git-flow
What are these different kind of branches
● development branch
● feature branch
● release branch
● master branch
● hotfix branch
Branches
Merging a feature branch into development
1. git checkout development
2. git checkout -b JIRA-103
3. work on the feature.
4. commit your changes to the branch.
5. git checkout development
6. git pull origin development
7. if no new changes are received in the pull
8. git merge --no-ff JIRA-103
9. git push origin development
10. git branch -d JIRA-103
Merging a feature branch into development
1. ….
2. if some new changes are received in the pull
3. git checkout JIRA-103
4. git rebase development // Rebasing the current branch (JIRA-
103) with development
5. git checkout development
6. git merge --no-ff JIRA-103
7. git push origin development
8. git branch -d JIRA-103
Work flow 1: Working on a feature
1. git checkout development
2. git checkout -b JIRA-103
3. work on the feature.
4. commit your changes to the branch.
5. git checkout development
6. git pull origin development
7. if there are no new changes recieved in the pull
8. git merge --no-ff JIRA-103
9. git push origin development
Work flow 1: Working on a feature
1. ...
2. git checkout development
3. git pull origin development
4. if there are some new changes received in the pull
5. git checkout JIRA-103
6. git rebase development
7. git checkout development
8. git merge --no-ff JIRA-103
9. git push origin development
Workflow 2: Releasing to production
1. git checkout development
2. git checkout -b release-2.1
3. up the application version and commit this change.
4. git push origin release-2.1
5. test the release branch on staging environment
6. if there are any issues, fix them only on release branch
7. once satisfied, git checkout master
8. git merge --no-ff release-2.1
9. git tag v2.1
10. git push origin master
Workflow 2: Releasing to production
...
once satisfied with release-2.1
git checkout master
git merge --no-ff release-2.1
git tag v2.1
git push origin master
git push --tags
deploy the master branch to production.
Workflow 3: Addressing the Production issues:
Hotfix branch
Once the master has been deployed to production and there is some issue
on production.
1. git checkout master
2. git checkout -b hot-fix-2.1.1
3. increase the application version.
4. fix the issue and commit the changes.
Merge the hotfix branch on master & development *(if there is no
active release branch. If there is one then merge it on master and the
active release branch. )
Workflow 3: Addressing the Production issues:
Hotfix branch
Merging the hotfix branch on master..
1. git checkout master
2. git pull origin master
3. if there are no new changes:
4. git merge --no-ff hotfix-2.1.1
5. git push origin master
6. git branch -d hotfix-2.1.1
if there are changes in master then rebase the hotfix and then merge
Workflow 3: Addressing the Production issues:
Hotfix branch
Merging the hotfix branch on development..
1. git checkout development
2. git pull origin development
3. if there are no new changes:
4. git merge --no-ff hotfix-2.1.1
5. git push origin development
6. git branch -d hotfix-2.1.1
if there are changes in development then rebase the hotfix and then
merge
Few rules that worked for us..
● Never pull on one branch from another. In order to get those changes,
we do a rebase.
● Delete the feature branches, release branches and hotfix branches
once they are merged into the desired branch/es
● Never commit again on a branch which has already been merged into
the destination branch.
● Use feature branch names like ticket numbers, they help in quickly
identifying the purpose of the branch.
Must read..
http://nvie.com/posts/a-successful-git-branching-model/
Questions

More Related Content

What's hot (20)

PDF
Git Power Routines
Nicola Paolucci
 
PDF
Github, Travis-CI and Perl
Dave Cross
 
PDF
Continuous Integration for Spark Apps by Sean McIntyre
Spark Summit
 
PDF
Beyond QA
gilforcada
 
PDF
Git for Beginners
Rick Umali
 
PDF
plone.api
gilforcada
 
KEY
Development tools
Robert Deutz
 
PPTX
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
Luca Milanesio
 
PDF
Conversational Development
🌍 Job van der Voort
 
PPTX
It's all about feedback - code review as a great tool in the agile toolbox
Stefan Lay
 
PDF
Beyond Agile: Conversational Development
🌍 Job van der Voort
 
PDF
Open Source Monitoring in 2019
Kris Buytaert
 
PDF
GitLab webcast - Release 8.4
GitLab, Inc
 
PPTX
GitLab 8.5 Highlights and Step-by-step tutorial
Heather McNamee
 
PDF
Remote and Open: How GitLab functions (presentation at Landing.careers)
🌍 Job van der Voort
 
PPTX
Comparing Agile QA Approaches to End-to-End Testing
Katie Chin
 
PDF
Using Go in DevOps
Eficode
 
PDF
Building New on Top of Old: The Argument for Simplicity
New Relic
 
PPTX
How do you implement Continuous Delivery? Part 2: Code Management
Thoughtworks
 
PDF
GitOps , done Right
Kris Buytaert
 
Git Power Routines
Nicola Paolucci
 
Github, Travis-CI and Perl
Dave Cross
 
Continuous Integration for Spark Apps by Sean McIntyre
Spark Summit
 
Beyond QA
gilforcada
 
Git for Beginners
Rick Umali
 
plone.api
gilforcada
 
Development tools
Robert Deutz
 
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
Luca Milanesio
 
Conversational Development
🌍 Job van der Voort
 
It's all about feedback - code review as a great tool in the agile toolbox
Stefan Lay
 
Beyond Agile: Conversational Development
🌍 Job van der Voort
 
Open Source Monitoring in 2019
Kris Buytaert
 
GitLab webcast - Release 8.4
GitLab, Inc
 
GitLab 8.5 Highlights and Step-by-step tutorial
Heather McNamee
 
Remote and Open: How GitLab functions (presentation at Landing.careers)
🌍 Job van der Voort
 
Comparing Agile QA Approaches to End-to-End Testing
Katie Chin
 
Using Go in DevOps
Eficode
 
Building New on Top of Old: The Argument for Simplicity
New Relic
 
How do you implement Continuous Delivery? Part 2: Code Management
Thoughtworks
 
GitOps , done Right
Kris Buytaert
 

Similar to Managing releases effectively through git (20)

PPTX
Git development workflow
Sankar Suda
 
PDF
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
 
PDF
Essential git for developers
Adam Culp
 
PDF
Git with the flow
Dana White
 
PPTX
Git and git workflow best practice
Majid Hosseini
 
PPTX
Git - Simplified For Testers
upadhyay_25
 
PDF
Introduction to git flow
Knoldus Inc.
 
PDF
How to Really Get Git
Susan Tan
 
PDF
Introducing Git and git flow
Sebin Benjamin
 
PDF
Gn unify git
Priyanka Nag
 
PDF
Improving your workflow with git
Dídac Ríos
 
PDF
Git workshop
Reslan Al Tinawi
 
PPTX
git-flow R3Labs
Raül Pérez
 
PDF
Git best practices workshop
Otto Kekäläinen
 
PDF
01 git interview questions & answers
DeepQuest Software
 
PDF
Git and git flow
Fran García
 
PPTX
git Technologies
Hirantha Pradeep
 
PDF
Trunk based development for Beginners
Nebulaworks
 
PDF
Git and github - Verson Control for the Modern Developer
John Stevenson
 
PDF
git-commands-cheat-sheet-infopediya-com.pdf
murad khan
 
Git development workflow
Sankar Suda
 
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
 
Essential git for developers
Adam Culp
 
Git with the flow
Dana White
 
Git and git workflow best practice
Majid Hosseini
 
Git - Simplified For Testers
upadhyay_25
 
Introduction to git flow
Knoldus Inc.
 
How to Really Get Git
Susan Tan
 
Introducing Git and git flow
Sebin Benjamin
 
Gn unify git
Priyanka Nag
 
Improving your workflow with git
Dídac Ríos
 
Git workshop
Reslan Al Tinawi
 
git-flow R3Labs
Raül Pérez
 
Git best practices workshop
Otto Kekäläinen
 
01 git interview questions & answers
DeepQuest Software
 
Git and git flow
Fran García
 
git Technologies
Hirantha Pradeep
 
Trunk based development for Beginners
Nebulaworks
 
Git and github - Verson Control for the Modern Developer
John Stevenson
 
git-commands-cheat-sheet-infopediya-com.pdf
murad khan
 
Ad

Recently uploaded (20)

PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Ad

Managing releases effectively through git

  • 1. Managing releases effectively through Git - By Mohd Farid
  • 2. Agenda ● Git branching support ● Why branching strategy? ● Introducing git-flow ● Different branches for different purposes ● Different Workfows while using git-flow
  • 3. Git branching support ● Git allows us to create multiple branches. ● Merge any branch into another. ● Pull changes from any branch to any branch. Note: With great power comes great responsibilities
  • 4. Why do I need a branching strategy?
  • 5. Git branching strategy - Why it is important ? Frequent overwriting of my commits by this guy.
  • 6. Git branching strategy - Why it is important ? Difficult to debug what went wrong from the clumsy tree structure.
  • 7. Git branching strategy - Why it is important ? Situation goes out of control: We call the experts … and they do things like.. git reset HEAD git reset HARD and .. evil Our hearts start beating faster and faster… with each command they type !!!
  • 8. Git branching strategy - Why it is important ? We always have a stable branch ready to be deployed to production.
  • 9. But before we solve it, lets see, how things go wrong… The good, The bad and the ugly
  • 10. The Good - Single developer days
  • 11. The Bad - Two developers on the project
  • 12. The Ugly - Multiple developer days.. It definitely needs a genius (+ time) to decipher this tree.
  • 13. What is the way out from this ….. life ?
  • 14. Lets meet a branching strategy.. Git-flow Git-flow is a way to manage our code such that: ● There are no code overrides by my colleague. ● If something goes wrong, I can easily figure out which commit failed by referring to a very simple tree.
  • 15. Lets meet a branching strategy.. Git-flow Ques: Do I need to learn new set of commands for this Ans: NO, We just need to be follow a simple process and everything will fall in place.
  • 16. Most frequently used commands git pull origin development git checkout -b branchName git commit -am “Commit message” git merge --no-ff feature-branch git rebase git branch -d git push origin development
  • 18. What are these different kind of branches ● development branch ● feature branch ● release branch ● master branch ● hotfix branch
  • 20. Merging a feature branch into development 1. git checkout development 2. git checkout -b JIRA-103 3. work on the feature. 4. commit your changes to the branch. 5. git checkout development 6. git pull origin development 7. if no new changes are received in the pull 8. git merge --no-ff JIRA-103 9. git push origin development 10. git branch -d JIRA-103
  • 21. Merging a feature branch into development 1. …. 2. if some new changes are received in the pull 3. git checkout JIRA-103 4. git rebase development // Rebasing the current branch (JIRA- 103) with development 5. git checkout development 6. git merge --no-ff JIRA-103 7. git push origin development 8. git branch -d JIRA-103
  • 22. Work flow 1: Working on a feature 1. git checkout development 2. git checkout -b JIRA-103 3. work on the feature. 4. commit your changes to the branch. 5. git checkout development 6. git pull origin development 7. if there are no new changes recieved in the pull 8. git merge --no-ff JIRA-103 9. git push origin development
  • 23. Work flow 1: Working on a feature 1. ... 2. git checkout development 3. git pull origin development 4. if there are some new changes received in the pull 5. git checkout JIRA-103 6. git rebase development 7. git checkout development 8. git merge --no-ff JIRA-103 9. git push origin development
  • 24. Workflow 2: Releasing to production 1. git checkout development 2. git checkout -b release-2.1 3. up the application version and commit this change. 4. git push origin release-2.1 5. test the release branch on staging environment 6. if there are any issues, fix them only on release branch 7. once satisfied, git checkout master 8. git merge --no-ff release-2.1 9. git tag v2.1 10. git push origin master
  • 25. Workflow 2: Releasing to production ... once satisfied with release-2.1 git checkout master git merge --no-ff release-2.1 git tag v2.1 git push origin master git push --tags deploy the master branch to production.
  • 26. Workflow 3: Addressing the Production issues: Hotfix branch Once the master has been deployed to production and there is some issue on production. 1. git checkout master 2. git checkout -b hot-fix-2.1.1 3. increase the application version. 4. fix the issue and commit the changes. Merge the hotfix branch on master & development *(if there is no active release branch. If there is one then merge it on master and the active release branch. )
  • 27. Workflow 3: Addressing the Production issues: Hotfix branch Merging the hotfix branch on master.. 1. git checkout master 2. git pull origin master 3. if there are no new changes: 4. git merge --no-ff hotfix-2.1.1 5. git push origin master 6. git branch -d hotfix-2.1.1 if there are changes in master then rebase the hotfix and then merge
  • 28. Workflow 3: Addressing the Production issues: Hotfix branch Merging the hotfix branch on development.. 1. git checkout development 2. git pull origin development 3. if there are no new changes: 4. git merge --no-ff hotfix-2.1.1 5. git push origin development 6. git branch -d hotfix-2.1.1 if there are changes in development then rebase the hotfix and then merge
  • 29. Few rules that worked for us.. ● Never pull on one branch from another. In order to get those changes, we do a rebase. ● Delete the feature branches, release branches and hotfix branches once they are merged into the desired branch/es ● Never commit again on a branch which has already been merged into the destination branch. ● Use feature branch names like ticket numbers, they help in quickly identifying the purpose of the branch.