SlideShare a Scribd company logo
1 of 31
Download to read offline
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

Github, Travis-CI and Perl
Github, Travis-CI and PerlGithub, Travis-CI and Perl
Github, Travis-CI and PerlDave Cross
 
Continuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreContinuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreSpark Summit
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for BeginnersRick Umali
 
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery AnalyticsDevoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery AnalyticsLuca Milanesio
 
It's all about feedback - code review as a great tool in the agile toolbox
It's all about feedback - code review as a great tool in the agile toolboxIt's all about feedback - code review as a great tool in the agile toolbox
It's all about feedback - code review as a great tool in the agile toolboxStefan Lay
 
Beyond Agile: Conversational Development
Beyond Agile: Conversational DevelopmentBeyond Agile: Conversational Development
Beyond Agile: Conversational Development🌍 Job van der Voort
 
Open Source Monitoring in 2019
Open Source Monitoring in 2019 Open Source Monitoring in 2019
Open Source Monitoring in 2019 Kris Buytaert
 
GitLab webcast - Release 8.4
GitLab webcast - Release 8.4GitLab webcast - Release 8.4
GitLab webcast - Release 8.4GitLab, Inc
 
GitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorialGitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorialHeather McNamee
 
Remote and Open: How GitLab functions (presentation at Landing.careers)
Remote and Open: How GitLab functions (presentation at Landing.careers)Remote and Open: How GitLab functions (presentation at Landing.careers)
Remote and Open: How GitLab functions (presentation at Landing.careers)🌍 Job van der Voort
 
Comparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingComparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingKatie Chin
 
Using Go in DevOps
Using Go in DevOpsUsing Go in DevOps
Using Go in DevOpsEficode
 
Building New on Top of Old: The Argument for Simplicity
Building New on Top of Old: The Argument for SimplicityBuilding New on Top of Old: The Argument for Simplicity
Building New on Top of Old: The Argument for SimplicityNew Relic
 
How do you implement Continuous Delivery? Part 2: Code Management
How do you implement Continuous Delivery? Part 2: Code ManagementHow do you implement Continuous Delivery? Part 2: Code Management
How do you implement Continuous Delivery? Part 2: Code ManagementThoughtworks
 

What's hot (20)

Git Power Routines
Git Power RoutinesGit Power Routines
Git Power Routines
 
Github, Travis-CI and Perl
Github, Travis-CI and PerlGithub, Travis-CI and Perl
Github, Travis-CI and Perl
 
Continuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreContinuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyre
 
Beyond QA
Beyond QABeyond QA
Beyond QA
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for Beginners
 
plone.api
plone.apiplone.api
plone.api
 
Development tools
Development toolsDevelopment tools
Development tools
 
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery AnalyticsDevoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
 
Conversational Development
Conversational DevelopmentConversational Development
Conversational Development
 
It's all about feedback - code review as a great tool in the agile toolbox
It's all about feedback - code review as a great tool in the agile toolboxIt's all about feedback - code review as a great tool in the agile toolbox
It's all about feedback - code review as a great tool in the agile toolbox
 
Beyond Agile: Conversational Development
Beyond Agile: Conversational DevelopmentBeyond Agile: Conversational Development
Beyond Agile: Conversational Development
 
Open Source Monitoring in 2019
Open Source Monitoring in 2019 Open Source Monitoring in 2019
Open Source Monitoring in 2019
 
GitLab webcast - Release 8.4
GitLab webcast - Release 8.4GitLab webcast - Release 8.4
GitLab webcast - Release 8.4
 
GitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorialGitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorial
 
Remote and Open: How GitLab functions (presentation at Landing.careers)
Remote and Open: How GitLab functions (presentation at Landing.careers)Remote and Open: How GitLab functions (presentation at Landing.careers)
Remote and Open: How GitLab functions (presentation at Landing.careers)
 
Comparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End TestingComparing Agile QA Approaches to End-to-End Testing
Comparing Agile QA Approaches to End-to-End Testing
 
Using Go in DevOps
Using Go in DevOpsUsing Go in DevOps
Using Go in DevOps
 
Building New on Top of Old: The Argument for Simplicity
Building New on Top of Old: The Argument for SimplicityBuilding New on Top of Old: The Argument for Simplicity
Building New on Top of Old: The Argument for Simplicity
 
How do you implement Continuous Delivery? Part 2: Code Management
How do you implement Continuous Delivery? Part 2: Code ManagementHow do you implement Continuous Delivery? Part 2: Code Management
How do you implement Continuous Delivery? Part 2: Code Management
 
GitOps , done Right
GitOps , done RightGitOps , done Right
GitOps , done Right
 

Similar to Managing releases effectively through git

Git development workflow
Git development workflowGit development workflow
Git development workflowSankar Suda
 
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
 
Essential git for developers
Essential git for developersEssential git for developers
Essential git for developersAdam Culp
 
Git with the flow
Git with the flowGit with the flow
Git with the flowDana White
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practiceMajid Hosseini
 
Git - Simplified For Testers
Git - Simplified For TestersGit - Simplified For Testers
Git - Simplified For Testersupadhyay_25
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced gitGerrit Wanderer
 
Introduction to git flow
Introduction to git flowIntroduction to git flow
Introduction to git flowKnoldus Inc.
 
How to Really Get Git
How to Really Get GitHow to Really Get Git
How to Really Get GitSusan Tan
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for developmentGerrit Wanderer
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow Sebin Benjamin
 
Improving your workflow with git
Improving your workflow with gitImproving your workflow with git
Improving your workflow with gitDídac Ríos
 
01 git interview questions & answers
01   git interview questions & answers01   git interview questions & answers
01 git interview questions & answersDeepQuest Software
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for BeginnersNebulaworks
 

Similar to Managing releases effectively through git (20)

Git development workflow
Git development workflowGit development workflow
Git development workflow
 
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
 
Essential git for developers
Essential git for developersEssential git for developers
Essential git for developers
 
Git with the flow
Git with the flowGit with the flow
Git with the flow
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Git - Simplified For Testers
Git - Simplified For TestersGit - Simplified For Testers
Git - Simplified For Testers
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
 
Introduction to git flow
Introduction to git flowIntroduction to git flow
Introduction to git flow
 
How to Really Get Git
How to Really Get GitHow to Really Get Git
How to Really Get Git
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for development
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
Gn unify git
Gn unify gitGn unify git
Gn unify git
 
Improving your workflow with git
Improving your workflow with gitImproving your workflow with git
Improving your workflow with git
 
Git workshop
Git workshopGit workshop
Git workshop
 
git-flow R3Labs
git-flow R3Labsgit-flow R3Labs
git-flow R3Labs
 
Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
 
01 git interview questions & answers
01   git interview questions & answers01   git interview questions & answers
01 git interview questions & answers
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
git Technologies
git Technologiesgit Technologies
git Technologies
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for Beginners
 

Recently uploaded

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 

Recently uploaded (20)

Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 

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.