SlideShare a Scribd company logo
1 of 16
Download to read offline
Simplified Git
Flow
Branch it, tag it, release it, merge it
Geshan Manandhar
Quality and Maintenance Lead, Namshi.com
@geshan
geshan.com.np
Index
Prerequisites
Start a feature or bug fix on a new branch
Work done, lets push
Pushed the code? Let's open a merge/pull request
Team Lead reviews code
After review is ok, code is deployed to staging then live
How to name tags
Merge the tag to master when all tests are fine
Things to consider
Conclusion
Prerequisites
You are aware of what git is, what it does and its benefits
You know about basic git commands like add, commit, branch etc
Master is the stable branch which can be deployed anytime
You have already watched the video.git happens
Start a feature or bug fix on a
new branch
Always follow a naming convention when create new branch
Like: OP-21 (where OP is short for OpenData and 21 is the ticket
id from redmine/trello)
Always get the latest master branch before you start any issue
By typing: git checkout master && git fetch && git pull --
rebase origin master
Then get a branch out of the latest master
The command will be: git checkout -b OP-21
Now you can start working onf OP-21 - add blog content type
Work done, lets push
So you finished working on OP-21
Then you do the following to commit the changes:
git add .
git add -u - if files have been deleted
git commit - then write a commit message
Keep in mind commit messages need to be meaningful
You can do multiple logical commits.
git push origin OP-21
Pushed the code? Let's open a
merge/pull request
It is recommended that you your commits to single onesquash
To a merge request, always get latest master then rebase your
branch
Be in your branch git checkout OP-21, then execute: git rebase
master.
As you just rebased with master, you may need to force push : git
push -f origin OP-21
Browse to gitlab open a merge request
Put the issue in right status/column on redmine/trello and put the
merge request link in the comment.
Team Lead reviews code
Team/Project Lead should always check and review code for each
pull/merge request
Code review is done to ensure coding standards, coding and naming
conventions.
It is also done to ensure code is maintainable on the long run.
If there are comments, it needs to be addressed by the software
engineer by re-working.
If the code matches standards, does the work and tests are passing it
can be deployed.
After review is ok, code is
deployed to staging then live
First deployed to Staging
For staging, its ok to deploy the branch with a deployment process.
If all tests are fine, then code is deployed to live.
For live/productions, always create a tag and deploy the tag
Given you are on OP-21 branch, execute git tag 1.11.2
Then push the tag: git push origin 1.11.2 and deploy it live
How to name the tags
Tags are basically pointers to a particular commit
Naming depends on the version conventions.
1.11.2-p0 can mean 1st Year of operation, month of November,
date is 2 - p0 for second release of the day
1.44.3 can mean 1st Year of operation, week no. 44 and release no
3, if you follow weekly sprints.
If you use tags for staging you could suffix it with rc-1, rc for
release candidate
Merge the tag to master when
live is stable
After testing and monitoring the live deployment, tag can be
merged to master
To merge the tag to master, get the latest master
Then run: git merge --no-ff 1.11.2 know why --no-ff
All the changes that were deployed are in master right now
Then you can deploy another branch after tagging it.
Next tag for the same day will be 1.11.2-p0
Here p0 means patch 0 or 2nd deployment of the day.
Things to consider
Never force push on master
You can force push on your branch provided others have not
branched out from your branch.
If tickets/issues are related, you can branch out from a different
branch than master
If you branched out of OP-10, you can send a merge/pull request to
OP-10 as well.
Always align your branch from your source branch which is
generally master.
Hot-fix branches have not been covered.
Conclusion/Recap
Git flow is easier than it looks, with single ticket deployments.
Git flow encourages rigorous code reviews.
It helps to follow a standard procedure.
Rollbacks are easier as you know the last deployed live tag.
Questions???
Credits
http://hades.name/blog/2010/01/22/git-your-friend-not-foe-vol-2-
branches/
https://www.flickr.com/photos/oberazzi/318947873/
Some programming mantras to remember.

More Related Content

What's hot

EFL QA: Where Are We and Where Should We Go?
EFL QA: Where Are We and Where Should We Go?EFL QA: Where Are We and Where Should We Go?
EFL QA: Where Are We and Where Should We Go?
Samsung Open Source Group
 
Feature Toggles
Feature TogglesFeature Toggles
Feature Toggles
Devi Sridharan
 

What's hot (19)

Please review and merge
Please review and mergePlease review and merge
Please review and merge
 
Git workflows
Git workflowsGit workflows
Git workflows
 
EFL QA: Where Are We and Where Should We Go?
EFL QA: Where Are We and Where Should We Go?EFL QA: Where Are We and Where Should We Go?
EFL QA: Where Are We and Where Should We Go?
 
Feature Toggles On Steroids
Feature Toggles On SteroidsFeature Toggles On Steroids
Feature Toggles On Steroids
 
Feature Toggles
Feature TogglesFeature Toggles
Feature Toggles
 
Git for work groups ironhack talk
Git for work groups ironhack talkGit for work groups ironhack talk
Git for work groups ironhack talk
 
Release This! Tools for a Smooth Release Cycle
Release This! Tools for a Smooth Release CycleRelease This! Tools for a Smooth Release Cycle
Release This! Tools for a Smooth Release Cycle
 
API Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+CucumberAPI Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+Cucumber
 
PHPUnit with Magento
PHPUnit with MagentoPHPUnit with Magento
PHPUnit with Magento
 
Git Branching for Agile Teams
Git Branching for Agile Teams Git Branching for Agile Teams
Git Branching for Agile Teams
 
[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)
[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)
[E-Dev-Day 2015][3/4] QA Status Report (Stefan Schmidt)
 
Trunk-Based Development
Trunk-Based DevelopmentTrunk-Based Development
Trunk-Based Development
 
Strategy to setup Subversion for Salesforce development for Agile Team
Strategy to setup Subversion for Salesforce development for Agile TeamStrategy to setup Subversion for Salesforce development for Agile Team
Strategy to setup Subversion for Salesforce development for Agile Team
 
Branching and Merging and Bears, Oh My!
Branching and Merging and Bears, Oh My!Branching and Merging and Bears, Oh My!
Branching and Merging and Bears, Oh My!
 
User story workflow (eng)
User story workflow (eng)User story workflow (eng)
User story workflow (eng)
 
Git in 10 minutes (WordCamp Europe 2017)
Git in 10 minutes (WordCamp Europe 2017)Git in 10 minutes (WordCamp Europe 2017)
Git in 10 minutes (WordCamp Europe 2017)
 
Civilized Git Process
Civilized Git ProcessCivilized Git Process
Civilized Git Process
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
 
Deployment made easy with Git
Deployment made easy with GitDeployment made easy with Git
Deployment made easy with Git
 

Viewers also liked

Viewers also liked (8)

How to become a better software company technically
How to become a better software company technicallyHow to become a better software company technically
How to become a better software company technically
 
Git workflow
Git workflowGit workflow
Git workflow
 
Reunion Technique PMSIpilot - Janvier 2010
Reunion Technique PMSIpilot - Janvier 2010Reunion Technique PMSIpilot - Janvier 2010
Reunion Technique PMSIpilot - Janvier 2010
 
Git Workflow
Git WorkflowGit Workflow
Git Workflow
 
Начало работы с Git (Visual Studio 2013, Bitbucket) - version 2013
Начало работы с Git (Visual Studio 2013, Bitbucket) - version 2013Начало работы с Git (Visual Studio 2013, Bitbucket) - version 2013
Начало работы с Git (Visual Studio 2013, Bitbucket) - version 2013
 
Going Right! Software Delivery with Atlassian Solution
Going Right! Software Delivery with Atlassian SolutionGoing Right! Software Delivery with Atlassian Solution
Going Right! Software Delivery with Atlassian Solution
 
かんたんHeroku入門 - Heroku へのデプロイと運用 -
かんたんHeroku入門 - Heroku へのデプロイと運用 -かんたんHeroku入門 - Heroku へのデプロイと運用 -
かんたんHeroku入門 - Heroku へのデプロイと運用 -
 
OFM SOA Suite 11g - Quick Start Guide
OFM SOA Suite 11g - Quick Start GuideOFM SOA Suite 11g - Quick Start Guide
OFM SOA Suite 11g - Quick Start Guide
 

Similar to A simplified Gitflow

Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for development
Gerrit Wanderer
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
abodeltae
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
Gerrit Wanderer
 

Similar to A simplified Gitflow (20)

Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...
Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...
Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...
 
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
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for development
 
Git
GitGit
Git
 
Introduction to Git (part 3)
Introduction to Git (part 3)Introduction to Git (part 3)
Introduction to Git (part 3)
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
 
GIT Basics
GIT BasicsGIT Basics
GIT Basics
 
Managing releases effectively through git
Managing releases effectively through gitManaging releases effectively through git
Managing releases effectively through git
 
Git Best Practices.pptx
Git Best Practices.pptxGit Best Practices.pptx
Git Best Practices.pptx
 
Amending and Testing changes lab guide
Amending and Testing changes lab guideAmending and Testing changes lab guide
Amending and Testing changes lab guide
 
GITFlow definition for all software projects
GITFlow definition for all software projectsGITFlow definition for all software projects
GITFlow definition for all software projects
 
Source code management with Git
Source code management with GitSource code management with Git
Source code management with Git
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
Git branching policy and review comment's prefix
Git branching policy and review comment's prefixGit branching policy and review comment's prefix
Git branching policy and review comment's prefix
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
 
Git Basics
Git BasicsGit Basics
Git Basics
 
Git essentials
Git essentialsGit essentials
Git essentials
 
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a gitVincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
 
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
 

More from Geshan Manandhar

Drupal 7 basic setup and contrib modules for a brochure website
Drupal 7 basic setup and contrib modules for a brochure websiteDrupal 7 basic setup and contrib modules for a brochure website
Drupal 7 basic setup and contrib modules for a brochure website
Geshan Manandhar
 
Drupal 7 install with modules and themes
Drupal 7 install with modules and themesDrupal 7 install with modules and themes
Drupal 7 install with modules and themes
Geshan Manandhar
 
Business Rules Logical Experssion and SBVR
Business Rules Logical Experssion and SBVRBusiness Rules Logical Experssion and SBVR
Business Rules Logical Experssion and SBVR
Geshan Manandhar
 

More from Geshan Manandhar (20)

Are logs a software engineer’s best friend? Yes -- follow these best practices
Are logs a software engineer’s best friend? Yes -- follow these best practicesAre logs a software engineer’s best friend? Yes -- follow these best practices
Are logs a software engineer’s best friend? Yes -- follow these best practices
 
We lost $ 20.5K in one day and how we could have saved it… hint: better autom...
We lost $ 20.5K in one day and how we could have saved it… hint: better autom...We lost $ 20.5K in one day and how we could have saved it… hint: better autom...
We lost $ 20.5K in one day and how we could have saved it… hint: better autom...
 
Moving from A and B to 150 microservices, the journey, and learnings
Moving from A and B to 150 microservices, the journey, and learningsMoving from A and B to 150 microservices, the journey, and learnings
Moving from A and B to 150 microservices, the journey, and learnings
 
Adopt a painless continuous delivery culture, add more business value
Adopt a painless continuous delivery culture, add more business valueAdopt a painless continuous delivery culture, add more business value
Adopt a painless continuous delivery culture, add more business value
 
Things i wished i knew as a junior developer
Things i wished i knew as a junior developerThings i wished i knew as a junior developer
Things i wished i knew as a junior developer
 
Embrace chatops, stop installing deployment software - Laracon EU 2016
Embrace chatops, stop installing deployment software - Laracon EU 2016Embrace chatops, stop installing deployment software - Laracon EU 2016
Embrace chatops, stop installing deployment software - Laracon EU 2016
 
Embrace chatOps, stop installing deployment software
Embrace chatOps, stop installing deployment softwareEmbrace chatOps, stop installing deployment software
Embrace chatOps, stop installing deployment software
 
7 rules of simple and maintainable code
7 rules of simple and maintainable code7 rules of simple and maintainable code
7 rules of simple and maintainable code
 
Software engineering In Nepal mid 2015 part 01
Software engineering In Nepal mid 2015 part 01Software engineering In Nepal mid 2015 part 01
Software engineering In Nepal mid 2015 part 01
 
Things I wished I knew while doing my tech bachelor / undergraduate
Things I wished I knew while doing my tech bachelor / undergraduateThings I wished I knew while doing my tech bachelor / undergraduate
Things I wished I knew while doing my tech bachelor / undergraduate
 
Message Queues a basic overview
Message Queues a basic overviewMessage Queues a basic overview
Message Queues a basic overview
 
Most popular brands, people on facebook in nepal as of 2013 q4
Most popular brands, people on facebook in nepal as of 2013 q4Most popular brands, people on facebook in nepal as of 2013 q4
Most popular brands, people on facebook in nepal as of 2013 q4
 
Drupal 7 basic setup and contrib modules for a brochure website
Drupal 7 basic setup and contrib modules for a brochure websiteDrupal 7 basic setup and contrib modules for a brochure website
Drupal 7 basic setup and contrib modules for a brochure website
 
Git intro hands on windows with msysgit
Git intro hands on windows with msysgitGit intro hands on windows with msysgit
Git intro hands on windows with msysgit
 
Drupal 7 install with modules and themes
Drupal 7 install with modules and themesDrupal 7 install with modules and themes
Drupal 7 install with modules and themes
 
Drupal introduction
Drupal introductionDrupal introduction
Drupal introduction
 
No sql
No sqlNo sql
No sql
 
Business Rules Logical Experssion and SBVR
Business Rules Logical Experssion and SBVRBusiness Rules Logical Experssion and SBVR
Business Rules Logical Experssion and SBVR
 
Drupal A non technical Introduction
Drupal A non technical IntroductionDrupal A non technical Introduction
Drupal A non technical Introduction
 
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

A simplified Gitflow

  • 1. Simplified Git Flow Branch it, tag it, release it, merge it
  • 2. Geshan Manandhar Quality and Maintenance Lead, Namshi.com @geshan geshan.com.np
  • 3. Index Prerequisites Start a feature or bug fix on a new branch Work done, lets push Pushed the code? Let's open a merge/pull request Team Lead reviews code After review is ok, code is deployed to staging then live How to name tags Merge the tag to master when all tests are fine Things to consider Conclusion
  • 4. Prerequisites You are aware of what git is, what it does and its benefits You know about basic git commands like add, commit, branch etc Master is the stable branch which can be deployed anytime You have already watched the video.git happens
  • 5. Start a feature or bug fix on a new branch Always follow a naming convention when create new branch Like: OP-21 (where OP is short for OpenData and 21 is the ticket id from redmine/trello) Always get the latest master branch before you start any issue By typing: git checkout master && git fetch && git pull -- rebase origin master Then get a branch out of the latest master The command will be: git checkout -b OP-21 Now you can start working onf OP-21 - add blog content type
  • 6. Work done, lets push So you finished working on OP-21 Then you do the following to commit the changes: git add . git add -u - if files have been deleted git commit - then write a commit message Keep in mind commit messages need to be meaningful You can do multiple logical commits. git push origin OP-21
  • 7. Pushed the code? Let's open a merge/pull request It is recommended that you your commits to single onesquash To a merge request, always get latest master then rebase your branch Be in your branch git checkout OP-21, then execute: git rebase master. As you just rebased with master, you may need to force push : git push -f origin OP-21 Browse to gitlab open a merge request Put the issue in right status/column on redmine/trello and put the merge request link in the comment.
  • 8. Team Lead reviews code Team/Project Lead should always check and review code for each pull/merge request Code review is done to ensure coding standards, coding and naming conventions. It is also done to ensure code is maintainable on the long run. If there are comments, it needs to be addressed by the software engineer by re-working. If the code matches standards, does the work and tests are passing it can be deployed.
  • 9. After review is ok, code is deployed to staging then live First deployed to Staging For staging, its ok to deploy the branch with a deployment process. If all tests are fine, then code is deployed to live. For live/productions, always create a tag and deploy the tag Given you are on OP-21 branch, execute git tag 1.11.2 Then push the tag: git push origin 1.11.2 and deploy it live
  • 10. How to name the tags Tags are basically pointers to a particular commit Naming depends on the version conventions. 1.11.2-p0 can mean 1st Year of operation, month of November, date is 2 - p0 for second release of the day 1.44.3 can mean 1st Year of operation, week no. 44 and release no 3, if you follow weekly sprints. If you use tags for staging you could suffix it with rc-1, rc for release candidate
  • 11. Merge the tag to master when live is stable After testing and monitoring the live deployment, tag can be merged to master To merge the tag to master, get the latest master Then run: git merge --no-ff 1.11.2 know why --no-ff All the changes that were deployed are in master right now Then you can deploy another branch after tagging it. Next tag for the same day will be 1.11.2-p0 Here p0 means patch 0 or 2nd deployment of the day.
  • 12. Things to consider Never force push on master You can force push on your branch provided others have not branched out from your branch. If tickets/issues are related, you can branch out from a different branch than master If you branched out of OP-10, you can send a merge/pull request to OP-10 as well. Always align your branch from your source branch which is generally master. Hot-fix branches have not been covered.
  • 13. Conclusion/Recap Git flow is easier than it looks, with single ticket deployments. Git flow encourages rigorous code reviews. It helps to follow a standard procedure. Rollbacks are easier as you know the last deployed live tag.
  • 16. Some programming mantras to remember.