SlideShare a Scribd company logo
Git-Flow for Daily Use
@Mediacurrent
@kBasarab
Kevin Basarab
Sr. Drupal Developer
Mediacurrent

@Mediacurrent
@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
> git checkout -b new_branch
Switched to a new branch 'new_branch'
> git branch
develop
...
*new_branch
> git branch test_2

new_branch

> git branch -a;
*develop
master
remotes/origin/master
remotes/origin/develop

develop

Branching 101
Merging 101
> git checkout develop;
Switched to branch 'develop'
> git merge new_branch
Terminology
●

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
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? []
Create Feature
> git branch
* develop
master
> git checkout develop
> 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
Publish 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/123478900-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'
# 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
Finish 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'
> 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
Create release
> 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'

> 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
Finish Release
> 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
Hotfix
> 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
Resources
●
●
●

http://www.mediacurrent.com/blog/webinar-git-intro
http://nvie.com/posts/a-successful-git-branching-model/
http://datasift.github.com/gitflow/IntroducingGitFlow.html
Thank You!

Questions?
firstname.lastname@mediacurrent.com

@Mediacurrent

Mediacurrent.com

slideshare.net/mediacurrent

More Related Content

What's hot

Git Flow - An Introduction
Git Flow - An IntroductionGit Flow - An Introduction
Git Flow - An Introduction
Knoldus Inc.
 
Git & gitflow
Git & gitflowGit & gitflow
Git & gitflow
Nolifelover Earn
 
Git Tricks — git utilities that make life git easier
Git Tricks — git utilities that make life git easierGit Tricks — git utilities that make life git easier
Git Tricks — git utilities that make life git easier
Christoph Matthies
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for Beginners
MortezaTaghaddomi
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
Fran García
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
Bartosz Kosarzycki
 
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
 
Git flow
Git flowGit flow
Git flow
Valerio Como
 
19 GitFlow #burningkeyboards
19 GitFlow #burningkeyboards19 GitFlow #burningkeyboards
19 GitFlow #burningkeyboards
Denis Ristic
 
git flow
git flowgit flow
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
Javier Alvarez
 
Pubmi gitflow
Pubmi gitflowPubmi gitflow
Pubmi gitflow
Simone Gentili
 
Git Series. Episode 2. Merge, Upstream Commands and Tags
Git Series. Episode 2. Merge, Upstream Commands and TagsGit Series. Episode 2. Merge, Upstream Commands and Tags
Git Series. Episode 2. Merge, Upstream Commands and Tags
Mikhail Melnik
 
Git Tricks
Git TricksGit Tricks
Git Tricks
Ivelina Dimova
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
Arthur Shvetsov
 
Git flow cheatsheet
Git flow cheatsheetGit flow cheatsheet
Git flow cheatsheet
Funato Takashi
 
Git
GitGit
Undoing Things in Git
Undoing Things in GitUndoing Things in Git
Undoing Things in Git
gittower
 
Advanced Git
Advanced GitAdvanced Git
Advanced Git
Sergiu-Ioan Ungur
 

What's hot (20)

Git Flow - An Introduction
Git Flow - An IntroductionGit Flow - An Introduction
Git Flow - An Introduction
 
Git & gitflow
Git & gitflowGit & gitflow
Git & gitflow
 
Git Tricks — git utilities that make life git easier
Git Tricks — git utilities that make life git easierGit Tricks — git utilities that make life git easier
Git Tricks — git utilities that make life git easier
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for Beginners
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
Git-flow workflow and pull-requests
Git-flow workflow and pull-requestsGit-flow workflow and pull-requests
Git-flow workflow and pull-requests
 
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?
 
Git flow
Git flowGit flow
Git flow
 
19 GitFlow #burningkeyboards
19 GitFlow #burningkeyboards19 GitFlow #burningkeyboards
19 GitFlow #burningkeyboards
 
git flow
git flowgit flow
git flow
 
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
 
Pubmi gitflow
Pubmi gitflowPubmi gitflow
Pubmi gitflow
 
Git Series. Episode 2. Merge, Upstream Commands and Tags
Git Series. Episode 2. Merge, Upstream Commands and TagsGit Series. Episode 2. Merge, Upstream Commands and Tags
Git Series. Episode 2. Merge, Upstream Commands and Tags
 
Git Tricks
Git TricksGit Tricks
Git Tricks
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
 
Git flow cheatsheet
Git flow cheatsheetGit flow cheatsheet
Git flow cheatsheet
 
Git
GitGit
Git
 
GIT - GOOD PRACTICES
GIT - GOOD PRACTICESGIT - GOOD PRACTICES
GIT - GOOD PRACTICES
 
Undoing Things in Git
Undoing Things in GitUndoing Things in Git
Undoing Things in Git
 
Advanced Git
Advanced GitAdvanced Git
Advanced Git
 

Similar to DcATL 2013: Git-Flow for Daily Use

Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
Majid Hosseini
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
seungzzang Kim
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
Automat-IT
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for developmentGerrit Wanderer
 
Git flow - how to
Git flow - how toGit flow - how to
Git flow - how to
Patryk Szlagowski
 
Introduction of Git
Introduction of GitIntroduction of Git
Introduction of GitWayne Chen
 
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
Codemotion
 
Honestly Git Playground 20190221
Honestly Git Playground 20190221Honestly Git Playground 20190221
Honestly Git Playground 20190221
Shinho Kang
 
Git lab installation guide
Git lab installation guideGit lab installation guide
Git lab installation guideRaiful Hasan
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced gitGerrit Wanderer
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
Stephen Yeargin
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
alignan
 
git Technologies
git Technologiesgit Technologies
git Technologies
Hirantha Pradeep
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
John Ombagi
 
Git github
Git githubGit github
Git github
Anurag Deb
 
How To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub CloneHow To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub Clone
VEXXHOST Private Cloud
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer CheatsheetAbdul Basit
 
Git tech talk
Git tech talkGit tech talk
Git tech talkrazasayed
 
Working with multiple git repositories
Working with multiple git repositoriesWorking with multiple git repositories
Working with multiple git repositories
Julien Pivotto
 
Git submodule
Git submoduleGit submodule
Git submodule
Olaf Alders
 

Similar to DcATL 2013: Git-Flow for Daily Use (20)

Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
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
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for development
 
Git flow - how to
Git flow - how toGit flow - how to
Git flow - how to
 
Introduction of Git
Introduction of GitIntroduction of Git
Introduction of Git
 
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
 
Honestly Git Playground 20190221
Honestly Git Playground 20190221Honestly Git Playground 20190221
Honestly Git Playground 20190221
 
Git lab installation guide
Git lab installation guideGit lab installation guide
Git lab installation guide
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
 
git Technologies
git Technologiesgit Technologies
git Technologies
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git github
Git githubGit github
Git github
 
How To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub CloneHow To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub Clone
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer Cheatsheet
 
Git tech talk
Git tech talkGit tech talk
Git tech talk
 
Working with multiple git repositories
Working with multiple git repositoriesWorking with multiple git repositories
Working with multiple git repositories
 
Git submodule
Git submoduleGit submodule
Git submodule
 

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 Gatsby
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
Reimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web StrategyReimagining Your Higher Ed Web Strategy
Reimagining Your Higher Ed Web Strategy
Mediacurrent
 
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
Mediacurrent
 
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 Websites
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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
Mediacurrent
 
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

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 

Recently uploaded (20)

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 

DcATL 2013: Git-Flow for Daily Use

  • 1. Git-Flow for Daily Use @Mediacurrent @kBasarab
  • 2. Kevin Basarab Sr. Drupal Developer Mediacurrent @Mediacurrent @kBasarab
  • 3. Prereqs ● ● ● Git 101 A multiple environment setup (Dev-Stage-Prod) Comfortable on the CLI
  • 4. Benefits ● ● ● ● Parallel Development Collaboration Release Staging Support for Emergency fixes Source: http://datasift.github.com/gitflow/IntroducingGitFlow.html
  • 5. 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
  • 6. > git checkout -b new_branch Switched to a new branch 'new_branch' > git branch develop ... *new_branch > git branch test_2 new_branch > git branch -a; *develop master remotes/origin/master remotes/origin/develop develop Branching 101
  • 7. Merging 101 > git checkout develop; Switched to branch 'develop' > git merge new_branch
  • 8. Terminology ● 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
  • 14. 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
  • 15. 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? []
  • 16. Create Feature > git branch * develop master > git checkout develop > 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
  • 17. Publish 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/123478900-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' # 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
  • 18. Finish 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' > 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
  • 19. Create release > 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' > 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
  • 20. Finish Release > 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
  • 21. 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
  • 22. Hotfix > 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