SlideShare a Scribd company logo
1 of 23
Download to read offline
Git-Flow
for Daily Use
Kevin Basarab
Twitter: @kBasarab
IRC: @kBasarab
Prereqs
● Git 101
● A multiple environment setup (Dev-Stage-Prod)
● Comfortable on the CLI
Benefits
● Parallel Development
● Collaboration
● Release Staging
● Support for Emergency fixes
Source: http://datasift.github.com/gitflow/IntroducingGitFlow.html
What is Git-Flow
● At the core Git-flow is a branching and merging strategy
● GIT branches are cheap, merges are easy
● Other systems: Each branch is a complete replication of codebase
Branching 101
> git branch -a;
develop
new_branch
*develop
master
remotes/origin/master
remotes/origin/develop
> git checkout -b new_branch
Switched to a new branch 'new_branch'
> git branch
develop
...
*new_branch
> git branch test_2
Merging 101
> git checkout develop;
Switched to branch 'develop'
> git merge new_branch
● Master Branch
○ The production site codebase
● Develop Branch
○ All code ready for production on a staging environment
● Feature
○ Active code development. Usually related to one ticket.
● Release
○ Integration branch to test develop merging into master
● Hotfix
○ Emergency fix to the production site
Terminology
Visualize Git-Flow
Source: http://nvie.com/posts/a-successful-git-branching-model/
Visualize Git-Flow
Source: http://nvie.com/posts/a-successful-git-branching-model/
Visualize Git-Flow
Source: http://nvie.com/posts/a-successful-git-branching-model/
Visualize Git-Flow
Source: http://nvie.com/posts/a-successful-git-branching-model/
Source: http://bit.ly/10iUTKK
Scenario
● Start using git-flow on a basic git repo
● Roll code based on a ticket
● Have a peer code review or help build functionality.
● Release this to production
● We had a misspelling, fix on production
Setup Git-Flow
● Install git-flow locally.
○ https://github.com/nvie/gitflow/wiki/Mac-OS-X
○ https://github.com/nvie/gitflow/wiki/Linux
○ https://github.com/nvie/gitflow/wiki/Windows
> git status
# On branch master
nothing to commit (working directory clean)
> git-flow init
Which branch should be used for bringing forth production releases?
- master
Branch name for production releases: [master]
Branch name for "next release" development: [develop]
How to name your supporting branch prefixes?
Feature branches? [feature/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []
> git checkout develop
Create feature
> git branch
* develop
master
> git-flow feature start 1234-78900-Add-Feature
Switched to a new branch 'feature/1234-78900-Add-Feature'
Summary of actions:
- A new branch 'feature/1234-78900-Add-Feature' was created, based on
'develop'
- You are now on branch 'feature/1234-78900-Add-Feature'
Now, start committing on your feature. When done, use:
git flow feature finish 1234-78900-Add-Feature
> git-flow feature publish 1234-78900-Add-Feature
Total 0 (delta 0), reused 0 (delta 0)
remote: bb/acl: kbasarab is allowed. accepted payload.
To test.git
* [new branch] feature/1234-78900-Add-Feature -> feature/1234-
78900-Add-Feature
Already on 'feature/1234-78900-Add-Feature'
Summary of actions:
- A new remote branch 'feature/1234-78900-Add-Feature' was created
- The local branch 'feature/1234-78900-Add-Feature' was configured to
track the remote branch
- You are now on branch 'feature/1234-78900-Add-Feature'
Publish feature
# Another user on another computer:
> git fetch
> git checkout feature/1234-78900-Add-Feature
...
> git fetch; git rebase origin/feature/1234-78900-Add-Feature
...
> git push origin feature/1234-78900-Add-Feature
> git-flow feature finish 1234-78900-Add-Feature
Switched to branch 'develop'
Already up-to-date.
Deleted branch feature/1234-78900-Add-Feature (was f135b69).
Summary of actions:
- The feature branch 'feature/1234-78900-Add-Feature' was merged into
'develop'
- Feature branch 'feature/1234-78900-Add-Feature' has been removed
- You are now on branch 'develop'
Finish feature
> git push origin develop
Total 0 (delta 0), reused 0 (delta 0)
remote: bb/acl: kbasarab is allowed. accepted payload.
To test.git
f22f2d0..f135b69 develop -> develop
> git push origin :feature/1234-78900-Add-Feature
remote: bb/acl: kbasarab is allowed. accepted payload.
To test.git
- [deleted] feature/1234-78900-Add-Feature
> git-flow release start 2013-03-14.0
Switched to a new branch 'release/2013-03-14.0'
Summary of actions:
- A new branch 'release/2013-03-14.0' was created, based on 'develop'
- You are now on branch 'release/2013-03-14.0'
Follow-up actions:
- Bump the version number now!
- Start committing last-minute fixes in preparing your release
- When done, run:
git flow release finish '2013-03-14.0'
Create release
> git push origin release/2013-03-14.0
Total 0 (delta 0), reused 0 (delta 0)
remote: bb/acl: kbasarab is allowed. accepted payload.
To test.git
* [new branch] release/2013-03-14.0 -> release/2013-03-14.0
> git-flow release finish 2013-03-14.0
Switched to branch 'master'
Merge made by the 'recursive' strategy.
example.txt | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
Deleted branch release/2013-03-14.0 (was f135b69).
Summary of actions:
- Latest objects have been fetched from 'origin'
- Release branch has been merged into 'master'
- The release was tagged '2013-03-14.0'
- Release branch has been back-merged into 'develop'
- Release branch 'release/2013-03-14.0' has been deleted
> git push origin :release/2013-03-14.0
remote: bb/acl: kbasarab is allowed. accepted payload.
To test.git
- [deleted] release/2013-03-14.0
Finish release
> git push --tags
Counting objects: 2, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 352 bytes, done.
Total 2 (delta 0), reused 0 (delta 0)
remote: bb/acl: kbasarab is allowed. accepted payload.
To test.git
* [new tag] 2013-03-14.0 -> 2013-03-14.0
Finish release
> git-flow hotfix start 2013-03-17.0
Switched to a new branch 'hotfix/2013-03-17.0'
Summary of actions:
- A new branch 'hotfix/2013-03-17.0' was created, based on 'master'
- You are now on branch 'hotfix/2013-03-17.0'
Follow-up actions:
- Bump the version number now!
- Start committing your hot fixes
- When done, run:
git flow hotfix finish '2013-03-17.0'
> ... Commits
> git-flow hotfix finish 2013-03-17.0
> git push origin master
> git push --tags
Hotfix
● http://www.mediacurrent.com/blog/webinar-git-intro
● http://nvie.com/posts/a-successful-git-branching-model/
● http://datasift.github.com/gitflow/IntroducingGitFlow.html
Resources
Thank You!
Questions
Twitter: @kBasarab
IRC: @kBasarab

More Related Content

What's hot

Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewRueful Robin
 
Introduction to git flow
Introduction to git flowIntroduction to git flow
Introduction to git flowKnoldus Inc.
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHubNicolás Tourné
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash CourseNilay Binjola
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hubVenkat Malladi
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With GitNick Quaranto
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practiceMajid Hosseini
 
Learning git
Learning gitLearning git
Learning gitSid Anand
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyVivek Parihar
 
Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?John Congdon
 

What's hot (20)

Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Advanced Git
Advanced GitAdvanced Git
Advanced Git
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git workflows
Git workflowsGit workflows
Git workflows
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
 
Introduction to git flow
Introduction to git flowIntroduction to git flow
Introduction to git flow
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Git training v10
Git training v10Git training v10
Git training v10
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Learning git
Learning gitLearning git
Learning git
 
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
 
Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?
 
Basic Git Intro
Basic Git IntroBasic Git Intro
Basic Git Intro
 
Git flow
Git flowGit flow
Git flow
 

Viewers also liked

Git Workflow With Gitflow
Git Workflow With GitflowGit Workflow With Gitflow
Git Workflow With GitflowJosh Dvir
 
DcATL 2013: Git-Flow for Daily Use
DcATL 2013: Git-Flow for Daily UseDcATL 2013: Git-Flow for Daily Use
DcATL 2013: Git-Flow for Daily UseMediacurrent
 
Controle de Versão com Git e como Otimizar seu Workflow com Git Flow
Controle de Versão com Git e como Otimizar seu Workflow com Git FlowControle de Versão com Git e como Otimizar seu Workflow com Git Flow
Controle de Versão com Git e como Otimizar seu Workflow com Git FlowLucas Araújo Mezêncio
 
Pull Request (PR): A git workflow
Pull Request (PR): A git workflow Pull Request (PR): A git workflow
Pull Request (PR): A git workflow Joan Yin
 
Facilitando o desenvolvimento orientado a testes em aplicações PHP
Facilitando o desenvolvimento orientado a testes em aplicações PHPFacilitando o desenvolvimento orientado a testes em aplicações PHP
Facilitando o desenvolvimento orientado a testes em aplicações PHPPedro Chaves
 
Desbancando mitos sobre PHP e o futuro da linguagem
Desbancando mitos sobre PHP e o futuro da linguagemDesbancando mitos sobre PHP e o futuro da linguagem
Desbancando mitos sobre PHP e o futuro da linguagemPedro Chaves
 
Git in Continuous Deployment
Git in Continuous DeploymentGit in Continuous Deployment
Git in Continuous DeploymentBrett Child
 
Esqueça a linguagem e vire um programador de verdade
Esqueça a linguagem e vire um programador de verdadeEsqueça a linguagem e vire um programador de verdade
Esqueça a linguagem e vire um programador de verdadePedro Chaves
 
Git Flow: un processus de développement Agile
Git Flow: un processus de développement AgileGit Flow: un processus de développement Agile
Git Flow: un processus de développement AgileXavier Hausherr
 
GNU AS簡介
GNU AS簡介GNU AS簡介
GNU AS簡介Wen Liao
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitE Carter
 
Git branching-model
Git branching-modelGit branching-model
Git branching-modelAaron Huang
 
A successful git branching model 導讀
A successful git branching model 導讀A successful git branching model 導讀
A successful git branching model 導讀Wen Liao
 
Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰Will Huang
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git RightSven Peters
 
Jira as a Tool for Test Management
Jira as a Tool for Test ManagementJira as a Tool for Test Management
Jira as a Tool for Test ManagementMaija Laksa
 

Viewers also liked (20)

git flow
git flowgit flow
git flow
 
Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
 
Git Workflow With Gitflow
Git Workflow With GitflowGit Workflow With Gitflow
Git Workflow With Gitflow
 
DcATL 2013: Git-Flow for Daily Use
DcATL 2013: Git-Flow for Daily UseDcATL 2013: Git-Flow for Daily Use
DcATL 2013: Git-Flow for Daily Use
 
Controle de Versão com Git e como Otimizar seu Workflow com Git Flow
Controle de Versão com Git e como Otimizar seu Workflow com Git FlowControle de Versão com Git e como Otimizar seu Workflow com Git Flow
Controle de Versão com Git e como Otimizar seu Workflow com Git Flow
 
Pull Request (PR): A git workflow
Pull Request (PR): A git workflow Pull Request (PR): A git workflow
Pull Request (PR): A git workflow
 
Facilitando o desenvolvimento orientado a testes em aplicações PHP
Facilitando o desenvolvimento orientado a testes em aplicações PHPFacilitando o desenvolvimento orientado a testes em aplicações PHP
Facilitando o desenvolvimento orientado a testes em aplicações PHP
 
Desbancando mitos sobre PHP e o futuro da linguagem
Desbancando mitos sobre PHP e o futuro da linguagemDesbancando mitos sobre PHP e o futuro da linguagem
Desbancando mitos sobre PHP e o futuro da linguagem
 
Git in Continuous Deployment
Git in Continuous DeploymentGit in Continuous Deployment
Git in Continuous Deployment
 
Esqueça a linguagem e vire um programador de verdade
Esqueça a linguagem e vire um programador de verdadeEsqueça a linguagem e vire um programador de verdade
Esqueça a linguagem e vire um programador de verdade
 
Git Flow: un processus de développement Agile
Git Flow: un processus de développement AgileGit Flow: un processus de développement Agile
Git Flow: un processus de développement Agile
 
GNU AS簡介
GNU AS簡介GNU AS簡介
GNU AS簡介
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Git branching-model
Git branching-modelGit branching-model
Git branching-model
 
A successful git branching model 導讀
A successful git branching model 導讀A successful git branching model 導讀
A successful git branching model 導讀
 
Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
 
Jira as a Tool for Test Management
Jira as a Tool for Test ManagementJira as a Tool for Test Management
Jira as a Tool for Test Management
 
Git workflows
Git workflowsGit workflows
Git workflows
 
[系列活動] 機器學習速遊
[系列活動] 機器學習速遊[系列活動] 機器學習速遊
[系列活動] 機器學習速遊
 

Similar to Git flow for daily use

Gitflow - Una metología para manejo de Branches
Gitflow - Una metología para manejo de BranchesGitflow - Una metología para manejo de Branches
Gitflow - Una metología para manejo de BranchesJavier Alvarez
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptuallyseungzzang Kim
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-itAutomat-IT
 
Introduction of Git
Introduction of GitIntroduction of Git
Introduction of GitWayne Chen
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced gitGerrit Wanderer
 
Honestly Git Playground 20190221
Honestly Git Playground 20190221Honestly Git Playground 20190221
Honestly Git Playground 20190221Shinho Kang
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for developmentGerrit Wanderer
 
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017Codemotion
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshellalignan
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitJohn Ombagi
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflowsArthur Shvetsov
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer CheatsheetAbdul Basit
 
Git tech talk
Git tech talkGit tech talk
Git tech talkrazasayed
 
Git Intermediate Course
Git Intermediate CourseGit Intermediate Course
Git Intermediate CourseAli Abbasi
 
Git lab installation guide
Git lab installation guideGit lab installation guide
Git lab installation guideRaiful Hasan
 
Git development workflow
Git development workflowGit development workflow
Git development workflowSankar Suda
 

Similar to Git flow for daily use (20)

Gitflow - Una metología para manejo de Branches
Gitflow - Una metología para manejo de BranchesGitflow - Una metología para manejo de Branches
Gitflow - Una metología para manejo de Branches
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
Introduction of Git
Introduction of GitIntroduction of Git
Introduction of Git
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
 
Honestly Git Playground 20190221
Honestly Git Playground 20190221Honestly Git Playground 20190221
Honestly Git Playground 20190221
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for development
 
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
 
git Technologies
git Technologiesgit Technologies
git Technologies
 
Git github
Git githubGit github
Git github
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git flow - how to
Git flow - how toGit flow - how to
Git flow - how to
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer Cheatsheet
 
Git tech talk
Git tech talkGit tech talk
Git tech talk
 
Git Intermediate Course
Git Intermediate CourseGit Intermediate Course
Git Intermediate Course
 
Git lab installation guide
Git lab installation guideGit lab installation guide
Git lab installation guide
 
Git development workflow
Git development workflowGit development workflow
Git development workflow
 

More from Mediacurrent

Penn State News: Pivoting to Decoupled Drupal with Gatsby
Penn State News: Pivoting to Decoupled Drupal with GatsbyPenn State News: Pivoting to Decoupled Drupal with Gatsby
Penn State News: Pivoting to Decoupled Drupal with GatsbyMediacurrent
 
Evolving How We Measure Digital Success in Higher Ed
Evolving How We Measure Digital Success in Higher EdEvolving How We Measure Digital Success in Higher Ed
Evolving How We Measure Digital Success in Higher EdMediacurrent
 
Penn State scales static Drupal to new heights
Penn State scales static Drupal to new heightsPenn State scales static Drupal to new heights
Penn State scales static Drupal to new heightsMediacurrent
 
Delivering Meaningful Digital Experiences in Higher Ed
Delivering Meaningful Digital Experiences in Higher EdDelivering Meaningful Digital Experiences in Higher Ed
Delivering Meaningful Digital Experiences in Higher EdMediacurrent
 
Content Strategy: Building Connections with Your Audience
Content Strategy: Building Connections with Your AudienceContent Strategy: Building Connections with Your Audience
Content Strategy: Building Connections with Your AudienceMediacurrent
 
Decoupled Drupal and Gatsby in the Real World
Decoupled Drupal and Gatsby in the Real WorldDecoupled Drupal and Gatsby in the Real World
Decoupled Drupal and Gatsby in the Real WorldMediacurrent
 
A Better Way to Build and Manage Sites with Rain for Drupal 9
A Better Way to Build and Manage Sites with Rain for Drupal 9A Better Way to Build and Manage Sites with Rain for Drupal 9
A Better Way to Build and Manage Sites with Rain for Drupal 9Mediacurrent
 
Drupal Security: What You Need to Know
Drupal Security: What You Need to KnowDrupal Security: What You Need to Know
Drupal Security: What You Need to KnowMediacurrent
 
Leveraging Design Systems to Streamline Web Projects
Leveraging Design Systems to Streamline Web ProjectsLeveraging Design Systems to Streamline Web Projects
Leveraging Design Systems to Streamline Web ProjectsMediacurrent
 
Reimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web StrategyReimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web StrategyMediacurrent
 
How to Digitally Transform Higher Ed with Drupal
How to Digitally Transform Higher Ed with DrupalHow to Digitally Transform Higher Ed with Drupal
How to Digitally Transform Higher Ed with DrupalMediacurrent
 
Is my website accessible? Common mistakes (and how to fix them)
Is my website accessible? Common mistakes (and how to fix them)Is my website accessible? Common mistakes (and how to fix them)
Is my website accessible? Common mistakes (and how to fix them)Mediacurrent
 
Managing Images In Large Scale Drupal 8 & 9 Websites
Managing Images In Large Scale Drupal 8 & 9 WebsitesManaging Images In Large Scale Drupal 8 & 9 Websites
Managing Images In Large Scale Drupal 8 & 9 WebsitesMediacurrent
 
Paragraphs v Layout Builder - The Final Showdown
Paragraphs v Layout Builder - The Final ShowdownParagraphs v Layout Builder - The Final Showdown
Paragraphs v Layout Builder - The Final ShowdownMediacurrent
 
MagMutual.com: On the JAMStack with Gatsby and Drupal 8
 MagMutual.com: On the JAMStack with Gatsby and Drupal 8 MagMutual.com: On the JAMStack with Gatsby and Drupal 8
MagMutual.com: On the JAMStack with Gatsby and Drupal 8Mediacurrent
 
Creating an Organizational Culture of Giving Back to Drupal
Creating an Organizational Culture of Giving Back to DrupalCreating an Organizational Culture of Giving Back to Drupal
Creating an Organizational Culture of Giving Back to DrupalMediacurrent
 
Level Up Your Team: Front-End Development Best Practices
Level Up Your Team: Front-End Development Best PracticesLevel Up Your Team: Front-End Development Best Practices
Level Up Your Team: Front-End Development Best PracticesMediacurrent
 
Best Practices for Moving to Drupal 9
Best Practices for Moving to Drupal 9Best Practices for Moving to Drupal 9
Best Practices for Moving to Drupal 9Mediacurrent
 
How to Prove Marketing ROI: Overcoming Digital Marketing Challenges
How to Prove Marketing ROI: Overcoming Digital Marketing ChallengesHow to Prove Marketing ROI: Overcoming Digital Marketing Challenges
How to Prove Marketing ROI: Overcoming Digital Marketing ChallengesMediacurrent
 
Prepare Your Drupal 9 Action Plan
Prepare Your Drupal 9 Action Plan Prepare Your Drupal 9 Action Plan
Prepare Your Drupal 9 Action Plan Mediacurrent
 

More from Mediacurrent (20)

Penn State News: Pivoting to Decoupled Drupal with Gatsby
Penn State News: Pivoting to Decoupled Drupal with GatsbyPenn State News: Pivoting to Decoupled Drupal with Gatsby
Penn State News: Pivoting to Decoupled Drupal with Gatsby
 
Evolving How We Measure Digital Success in Higher Ed
Evolving How We Measure Digital Success in Higher EdEvolving How We Measure Digital Success in Higher Ed
Evolving How We Measure Digital Success in Higher Ed
 
Penn State scales static Drupal to new heights
Penn State scales static Drupal to new heightsPenn State scales static Drupal to new heights
Penn State scales static Drupal to new heights
 
Delivering Meaningful Digital Experiences in Higher Ed
Delivering Meaningful Digital Experiences in Higher EdDelivering Meaningful Digital Experiences in Higher Ed
Delivering Meaningful Digital Experiences in Higher Ed
 
Content Strategy: Building Connections with Your Audience
Content Strategy: Building Connections with Your AudienceContent Strategy: Building Connections with Your Audience
Content Strategy: Building Connections with Your Audience
 
Decoupled Drupal and Gatsby in the Real World
Decoupled Drupal and Gatsby in the Real WorldDecoupled Drupal and Gatsby in the Real World
Decoupled Drupal and Gatsby in the Real World
 
A Better Way to Build and Manage Sites with Rain for Drupal 9
A Better Way to Build and Manage Sites with Rain for Drupal 9A Better Way to Build and Manage Sites with Rain for Drupal 9
A Better Way to Build and Manage Sites with Rain for Drupal 9
 
Drupal Security: What You Need to Know
Drupal Security: What You Need to KnowDrupal Security: What You Need to Know
Drupal Security: What You Need to Know
 
Leveraging Design Systems to Streamline Web Projects
Leveraging Design Systems to Streamline Web ProjectsLeveraging Design Systems to Streamline Web Projects
Leveraging Design Systems to Streamline Web Projects
 
Reimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web StrategyReimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web Strategy
 
How to Digitally Transform Higher Ed with Drupal
How to Digitally Transform Higher Ed with DrupalHow to Digitally Transform Higher Ed with Drupal
How to Digitally Transform Higher Ed with Drupal
 
Is my website accessible? Common mistakes (and how to fix them)
Is my website accessible? Common mistakes (and how to fix them)Is my website accessible? Common mistakes (and how to fix them)
Is my website accessible? Common mistakes (and how to fix them)
 
Managing Images In Large Scale Drupal 8 & 9 Websites
Managing Images In Large Scale Drupal 8 & 9 WebsitesManaging Images In Large Scale Drupal 8 & 9 Websites
Managing Images In Large Scale Drupal 8 & 9 Websites
 
Paragraphs v Layout Builder - The Final Showdown
Paragraphs v Layout Builder - The Final ShowdownParagraphs v Layout Builder - The Final Showdown
Paragraphs v Layout Builder - The Final Showdown
 
MagMutual.com: On the JAMStack with Gatsby and Drupal 8
 MagMutual.com: On the JAMStack with Gatsby and Drupal 8 MagMutual.com: On the JAMStack with Gatsby and Drupal 8
MagMutual.com: On the JAMStack with Gatsby and Drupal 8
 
Creating an Organizational Culture of Giving Back to Drupal
Creating an Organizational Culture of Giving Back to DrupalCreating an Organizational Culture of Giving Back to Drupal
Creating an Organizational Culture of Giving Back to Drupal
 
Level Up Your Team: Front-End Development Best Practices
Level Up Your Team: Front-End Development Best PracticesLevel Up Your Team: Front-End Development Best Practices
Level Up Your Team: Front-End Development Best Practices
 
Best Practices for Moving to Drupal 9
Best Practices for Moving to Drupal 9Best Practices for Moving to Drupal 9
Best Practices for Moving to Drupal 9
 
How to Prove Marketing ROI: Overcoming Digital Marketing Challenges
How to Prove Marketing ROI: Overcoming Digital Marketing ChallengesHow to Prove Marketing ROI: Overcoming Digital Marketing Challenges
How to Prove Marketing ROI: Overcoming Digital Marketing Challenges
 
Prepare Your Drupal 9 Action Plan
Prepare Your Drupal 9 Action Plan Prepare Your Drupal 9 Action Plan
Prepare Your Drupal 9 Action Plan
 

Recently uploaded

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Recently uploaded (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

Git flow for daily use

  • 1. Git-Flow for Daily Use Kevin Basarab Twitter: @kBasarab IRC: @kBasarab
  • 2. Prereqs ● Git 101 ● A multiple environment setup (Dev-Stage-Prod) ● Comfortable on the CLI
  • 3. Benefits ● Parallel Development ● Collaboration ● Release Staging ● Support for Emergency fixes Source: http://datasift.github.com/gitflow/IntroducingGitFlow.html
  • 4. What is Git-Flow ● At the core Git-flow is a branching and merging strategy ● GIT branches are cheap, merges are easy ● Other systems: Each branch is a complete replication of codebase
  • 5. Branching 101 > git branch -a; develop new_branch *develop master remotes/origin/master remotes/origin/develop > git checkout -b new_branch Switched to a new branch 'new_branch' > git branch develop ... *new_branch > git branch test_2
  • 6. Merging 101 > git checkout develop; Switched to branch 'develop' > git merge new_branch
  • 7. ● Master Branch ○ The production site codebase ● Develop Branch ○ All code ready for production on a staging environment ● Feature ○ Active code development. Usually related to one ticket. ● Release ○ Integration branch to test develop merging into master ● Hotfix ○ Emergency fix to the production site Terminology
  • 13. Scenario ● Start using git-flow on a basic git repo ● Roll code based on a ticket ● Have a peer code review or help build functionality. ● Release this to production ● We had a misspelling, fix on production
  • 14. Setup Git-Flow ● Install git-flow locally. ○ https://github.com/nvie/gitflow/wiki/Mac-OS-X ○ https://github.com/nvie/gitflow/wiki/Linux ○ https://github.com/nvie/gitflow/wiki/Windows > git status # On branch master nothing to commit (working directory clean) > git-flow init Which branch should be used for bringing forth production releases? - master Branch name for production releases: [master] Branch name for "next release" development: [develop] How to name your supporting branch prefixes? Feature branches? [feature/] Release branches? [release/] Hotfix branches? [hotfix/] Support branches? [support/] Version tag prefix? []
  • 15. > git checkout develop Create feature > git branch * develop master > git-flow feature start 1234-78900-Add-Feature Switched to a new branch 'feature/1234-78900-Add-Feature' Summary of actions: - A new branch 'feature/1234-78900-Add-Feature' was created, based on 'develop' - You are now on branch 'feature/1234-78900-Add-Feature' Now, start committing on your feature. When done, use: git flow feature finish 1234-78900-Add-Feature
  • 16. > git-flow feature publish 1234-78900-Add-Feature Total 0 (delta 0), reused 0 (delta 0) remote: bb/acl: kbasarab is allowed. accepted payload. To test.git * [new branch] feature/1234-78900-Add-Feature -> feature/1234- 78900-Add-Feature Already on 'feature/1234-78900-Add-Feature' Summary of actions: - A new remote branch 'feature/1234-78900-Add-Feature' was created - The local branch 'feature/1234-78900-Add-Feature' was configured to track the remote branch - You are now on branch 'feature/1234-78900-Add-Feature' Publish feature # Another user on another computer: > git fetch > git checkout feature/1234-78900-Add-Feature ... > git fetch; git rebase origin/feature/1234-78900-Add-Feature ... > git push origin feature/1234-78900-Add-Feature
  • 17. > git-flow feature finish 1234-78900-Add-Feature Switched to branch 'develop' Already up-to-date. Deleted branch feature/1234-78900-Add-Feature (was f135b69). Summary of actions: - The feature branch 'feature/1234-78900-Add-Feature' was merged into 'develop' - Feature branch 'feature/1234-78900-Add-Feature' has been removed - You are now on branch 'develop' Finish feature > git push origin develop Total 0 (delta 0), reused 0 (delta 0) remote: bb/acl: kbasarab is allowed. accepted payload. To test.git f22f2d0..f135b69 develop -> develop > git push origin :feature/1234-78900-Add-Feature remote: bb/acl: kbasarab is allowed. accepted payload. To test.git - [deleted] feature/1234-78900-Add-Feature
  • 18. > git-flow release start 2013-03-14.0 Switched to a new branch 'release/2013-03-14.0' Summary of actions: - A new branch 'release/2013-03-14.0' was created, based on 'develop' - You are now on branch 'release/2013-03-14.0' Follow-up actions: - Bump the version number now! - Start committing last-minute fixes in preparing your release - When done, run: git flow release finish '2013-03-14.0' Create release > git push origin release/2013-03-14.0 Total 0 (delta 0), reused 0 (delta 0) remote: bb/acl: kbasarab is allowed. accepted payload. To test.git * [new branch] release/2013-03-14.0 -> release/2013-03-14.0
  • 19. > git-flow release finish 2013-03-14.0 Switched to branch 'master' Merge made by the 'recursive' strategy. example.txt | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) Deleted branch release/2013-03-14.0 (was f135b69). Summary of actions: - Latest objects have been fetched from 'origin' - Release branch has been merged into 'master' - The release was tagged '2013-03-14.0' - Release branch has been back-merged into 'develop' - Release branch 'release/2013-03-14.0' has been deleted > git push origin :release/2013-03-14.0 remote: bb/acl: kbasarab is allowed. accepted payload. To test.git - [deleted] release/2013-03-14.0 Finish release
  • 20. > git push --tags Counting objects: 2, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 352 bytes, done. Total 2 (delta 0), reused 0 (delta 0) remote: bb/acl: kbasarab is allowed. accepted payload. To test.git * [new tag] 2013-03-14.0 -> 2013-03-14.0 Finish release
  • 21. > git-flow hotfix start 2013-03-17.0 Switched to a new branch 'hotfix/2013-03-17.0' Summary of actions: - A new branch 'hotfix/2013-03-17.0' was created, based on 'master' - You are now on branch 'hotfix/2013-03-17.0' Follow-up actions: - Bump the version number now! - Start committing your hot fixes - When done, run: git flow hotfix finish '2013-03-17.0' > ... Commits > git-flow hotfix finish 2013-03-17.0 > git push origin master > git push --tags Hotfix