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
 
Git for work groups ironhack talk
Git for work groups ironhack talkGit for work groups ironhack talk
Git for work groups ironhack talkTiago Ameller
 
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 CycleGuerrilla
 
API Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+CucumberAPI Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+CucumberKnoldus Inc.
 
PHPUnit with Magento
PHPUnit with MagentoPHPUnit with Magento
PHPUnit with MagentoTu Hoang
 
Git Branching for Agile Teams
Git Branching for Agile Teams Git Branching for Agile Teams
Git Branching for Agile Teams Atlassian
 
[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)EnlightenmentProject
 
Trunk-Based Development
Trunk-Based DevelopmentTrunk-Based Development
Trunk-Based DevelopmentBryan Liu
 
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 TeamBuyan Thyagarajan
 
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!Imaginet
 
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)Borek Bernard
 
Civilized Git Process
Civilized Git ProcessCivilized Git Process
Civilized Git ProcessTu Hoang
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and TogglingBryan Liu
 
Deployment made easy with Git
Deployment made easy with GitDeployment made easy with Git
Deployment made easy with GitIgor Santos
 

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

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 technicallyGeshan Manandhar
 
Git workflow
Git workflowGit workflow
Git workflowPMSIpilot
 
Reunion Technique PMSIpilot - Janvier 2010
Reunion Technique PMSIpilot - Janvier 2010Reunion Technique PMSIpilot - Janvier 2010
Reunion Technique PMSIpilot - Janvier 2010PMSIpilot
 
Git Workflow
Git WorkflowGit Workflow
Git WorkflowGary Yeh
 
Начало работы с 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 へのデプロイと運用 -sakagami3
 
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 GuideSreenivasa Setty
 

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

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...Geshan Manandhar
 
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
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for developmentGerrit Wanderer
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model abodeltae
 
Managing releases effectively through git
Managing releases effectively through gitManaging releases effectively through git
Managing releases effectively through gitMohd Farid
 
Amending and Testing changes lab guide
Amending and Testing changes lab guideAmending and Testing changes lab guide
Amending and Testing changes lab guideopenstackcisco
 
GITFlow definition for all software projects
GITFlow definition for all software projectsGITFlow definition for all software projects
GITFlow definition for all software projectsThierry Gayet
 
Source code management with Git
Source code management with GitSource code management with Git
Source code management with GitRadu Barbu
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow IntroductionDavid Paluy
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow Sebin Benjamin
 
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 prefixKumaresh Chandra Baruri
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced gitGerrit Wanderer
 
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 gitVincitOy
 
CS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdfCS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdfalbusfons939393
 

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

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 practicesGeshan Manandhar
 
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...Geshan Manandhar
 
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 learningsGeshan Manandhar
 
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 valueGeshan Manandhar
 
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 developerGeshan Manandhar
 
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 2016Geshan Manandhar
 
Embrace chatOps, stop installing deployment software
Embrace chatOps, stop installing deployment softwareEmbrace chatOps, stop installing deployment software
Embrace chatOps, stop installing deployment softwareGeshan Manandhar
 
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 codeGeshan Manandhar
 
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 01Geshan Manandhar
 
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 / undergraduateGeshan Manandhar
 
Message Queues a basic overview
Message Queues a basic overviewMessage Queues a basic overview
Message Queues a basic overviewGeshan Manandhar
 
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 q4Geshan 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 websiteGeshan Manandhar
 
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 msysgitGeshan 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 themesGeshan Manandhar
 
Business Rules Logical Experssion and SBVR
Business Rules Logical Experssion and SBVRBusiness Rules Logical Experssion and SBVR
Business Rules Logical Experssion and SBVRGeshan Manandhar
 
Drupal A non technical Introduction
Drupal A non technical IntroductionDrupal A non technical Introduction
Drupal A non technical IntroductionGeshan 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

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

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.