SlideShare a Scribd company logo
40 Square’s GIT Workflow
                    Who Am I?


Lead developer in 40 square software
First Love: 6 years in Java (omfg what was I thinking)
Ex-GF: PHP hobbyist turned full time engineer
Wife: Node.JS, and Javascript in general
Twitter: @roguejs

    This will be a warp speed presentation!
Mercurial vs Git

We used fogbugz + kiln initially
Started off with feature branches
Merging conflicts took forever
REAL REASON: Bad practices
HIDDEN REASON: Fogbugz is expensive...
Other annoyances

No dry runs
Difficult to do code review
No cherry-picking
Bad planning and structure
Branching is expensive?
Our Deployment Process
                        LDC
  Dev                    C1         LDC
                                     B1


        push      hg
                          pull      CDC
Dev
                 repo                B

               Branches       CDC
  Dev          - qa            C
               - master
Deployment Problems
Accidentally merge into master? RED ALERT
QA testing on old code
Dev: “Is my feature merged yet?”
Lead: “Hold on, I’m fixing conflict #13285582309583”


                                                  live
                                                  dev1
                      invalidates previous test
                                                  dev2
Why Git?

Because github is sexy
Actually, because it’s cheaper than Kiln


Why not bitbucket?
Because github is sexy, and because I said so
Actually, because github still is cheaper (repo vs users)


Git has more options for branching and merging
Our Goals

Have a staging server that is a clone of live server
Abstract devs from live server
No more “it’s just one line of code, can I push to live
directly?”
Rapid deployment and lesser merge conflicts
Build better practices
Vincent Driessen Model
                                        40 square style



Long Running Branches:
  master - live servers
  staging - last line of defense
  devel - weekly deployments
Distributed blessed repo model
  Blessed repo managed by integrators
  Each dev gets own fork
Forking Model & Policy


Your own fork is your own responsibility
Feel free to force update your own fork
Rebase before sending pull requests
Typical Workflow (dev)

Dev starts work on an issue in Pivotal
Determine what kind of issue:
  P1- branch off from staging
  Bugs & Features - branch off from devel
Pull upstream often and rebase on upstream
Rebase again before sending pull request
Typical Workflow (dev)
git fetch --all (git version 1.7.x)

git branch --track up-devel upstream/devel

git branch P1-1305 up-devel



git fetch upstream devel

git checkout up-devel

git merge upstream/devel

git checkout P1-1305

git rebase up-devel
Typical Workflow (integrator)

Integrator receives pull request
Create a new branch in blessed repo
Pull update into that branch
Review code
Merge into staging/devel
Typical Workflow (Integrator)

git branch soggie-P1-1305 devel

git checkout soggie-P1-1305

git pull soggie P1-1305

git rebase devel

git checkout devel

git merge soggie-P1-1305

git push origin devel:devel
Overall Workflow
                                 LDC
  Dev                             C1         LDC
           git
                                              B1
          repo
  push
          git              git
                                   pull      CDC
Dev
         repo integrate   repo                B

          git
                                       CDC
         repo
  Dev                                   C
Timeline View


Black line = master
Blue line = staging
Green line = dev
Devel branch deployment
Every MONDAY, merge to staging
Once testing completes, tag and merge to master
If testing fails, all bug fixes are designated as P1
Bug fixes for release candidate is merged into staging

                                              master
                             fail
                                              staging
                                     fix
                                               devel
Staging branch deployment
Merge to staging and test
Once QA approves it, merge to master AND devel
Policy: Only one commit allowed to dangle



                                       master
                            never!!!
                                       staging

                                       devel
Policies

Do NOT force update blessed repo
  I will hunt you down, and kill you

Always rebase before sending pull request
If P1, branch off staging. Otherwise, branch off devel
Manage pull requests NOW
No dangling commits on staging
Benefits

Established workflow = peaceful work environment
Predictable integration & deployment
Conflicts = dev responsibility instead of integrator’s
Can dick around with own repo without killing blessed
repo
No more unpredictable testing environment
More Information
A successful branching model
http://nvie.com/posts/a-successful-git-branching-
model/
Git
http://git-scm.com/
Github
http://github.com/
Git video tutorials
http://gitcasts.com/

More Related Content

What's hot

Trunk based development
Trunk based developmentTrunk based development
Trunk based development
go_oh
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for Beginners
Nebulaworks
 
Git and Gerrit Code Review - Tech Talk - 2010_09_23
Git and Gerrit Code Review - Tech Talk - 2010_09_23Git and Gerrit Code Review - Tech Talk - 2010_09_23
Git and Gerrit Code Review - Tech Talk - 2010_09_23
msohn
 
Git branching-model
Git branching-modelGit branching-model
Git branching-model
Aaron Huang
 
A simplified Gitflow
A simplified GitflowA simplified Gitflow
A simplified Gitflow
Geshan Manandhar
 
Git Ready! Workflows
Git Ready! WorkflowsGit Ready! Workflows
Git Ready! Workflows
Atlassian
 
Android Mobile Continuous Integration. UA Mobile 2016.
Android Mobile Continuous Integration. UA Mobile 2016.Android Mobile Continuous Integration. UA Mobile 2016.
Android Mobile Continuous Integration. UA Mobile 2016.
UA Mobile
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
Bryan Liu
 
GitFlow Workshop
GitFlow WorkshopGitFlow Workshop
GitFlow Workshop
Syed Imam
 
Git in Continuous Deployment
Git in Continuous DeploymentGit in Continuous Deployment
Git in Continuous Deployment
Brett Child
 
Git with t for teams
Git with t for teamsGit with t for teams
Git with t for teams
Sven Peters
 
Git branch management
Git branch managementGit branch management
Git branch management
Matt Liu
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for Beginners
MortezaTaghaddomi
 
Continuous integration using Bamboo
Continuous integration using BambooContinuous integration using Bamboo
Continuous integration using Bamboo
Tudor Hornai
 
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
msohn
 
How to use Git Branch
How to use Git BranchHow to use Git Branch
How to use Git Branch
Phuoc Nguyen
 
Git Workflows
Git WorkflowsGit Workflows
Git Workflows
Noam Kfir
 
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Edureka!
 
Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with Jenkins
BeMyApp
 
Simple ci cd with strider cd
Simple ci cd with strider cdSimple ci cd with strider cd
Simple ci cd with strider cd
Amandeep Singh
 

What's hot (20)

Trunk based development
Trunk based developmentTrunk based development
Trunk based development
 
Trunk based development for Beginners
Trunk based development for BeginnersTrunk based development for Beginners
Trunk based development for Beginners
 
Git and Gerrit Code Review - Tech Talk - 2010_09_23
Git and Gerrit Code Review - Tech Talk - 2010_09_23Git and Gerrit Code Review - Tech Talk - 2010_09_23
Git and Gerrit Code Review - Tech Talk - 2010_09_23
 
Git branching-model
Git branching-modelGit branching-model
Git branching-model
 
A simplified Gitflow
A simplified GitflowA simplified Gitflow
A simplified Gitflow
 
Git Ready! Workflows
Git Ready! WorkflowsGit Ready! Workflows
Git Ready! Workflows
 
Android Mobile Continuous Integration. UA Mobile 2016.
Android Mobile Continuous Integration. UA Mobile 2016.Android Mobile Continuous Integration. UA Mobile 2016.
Android Mobile Continuous Integration. UA Mobile 2016.
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
 
GitFlow Workshop
GitFlow WorkshopGitFlow Workshop
GitFlow Workshop
 
Git in Continuous Deployment
Git in Continuous DeploymentGit in Continuous Deployment
Git in Continuous Deployment
 
Git with t for teams
Git with t for teamsGit with t for teams
Git with t for teams
 
Git branch management
Git branch managementGit branch management
Git branch management
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for Beginners
 
Continuous integration using Bamboo
Continuous integration using BambooContinuous integration using Bamboo
Continuous integration using Bamboo
 
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
Large Scale Development with Git and Gerrit - EclipseCon Europe 2012
 
How to use Git Branch
How to use Git BranchHow to use Git Branch
How to use Git Branch
 
Git Workflows
Git WorkflowsGit Workflows
Git Workflows
 
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
 
Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with Jenkins
 
Simple ci cd with strider cd
Simple ci cd with strider cdSimple ci cd with strider cd
Simple ci cd with strider cd
 

Similar to 40 square's git workflow

Gitlab meets Kubernetes
Gitlab meets KubernetesGitlab meets Kubernetes
Gitlab meets Kubernetes
inovex GmbH
 
Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel development
shalom938
 
Marrying Jenkins and Gerrit-Berlin Expert Days 2013
Marrying Jenkins and Gerrit-Berlin Expert Days 2013Marrying Jenkins and Gerrit-Berlin Expert Days 2013
Marrying Jenkins and Gerrit-Berlin Expert Days 2013Dharmesh Sheta
 
Short Introduction of software engineering for bioinformatics
Short Introduction of software engineering for bioinformatics Short Introduction of software engineering for bioinformatics
Short Introduction of software engineering for bioinformatics
丈 宮本
 
Skip Staging! Test Docker, Helm, and Kubernetes Apps like a Pro
Skip Staging! Test Docker, Helm, and Kubernetes Apps like a ProSkip Staging! Test Docker, Helm, and Kubernetes Apps like a Pro
Skip Staging! Test Docker, Helm, and Kubernetes Apps like a Pro
Codefresh
 
Ntd2015_pt_kanban_ppt
Ntd2015_pt_kanban_pptNtd2015_pt_kanban_ppt
Ntd2015_pt_kanban_ppt
Jokin Aspiazu
 
Beyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Beyond Scrum: Scaling Agile with Continuous Delivery and SubversionBeyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Beyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Product Marketing Services
 
Multi-QA Environment, parallel development with Git
Multi-QA Environment, parallel development with GitMulti-QA Environment, parallel development with Git
Multi-QA Environment, parallel development with Git
dopejam
 
Continuous delivery @åf consult
Continuous delivery @åf consultContinuous delivery @åf consult
Continuous delivery @åf consultTomas Riha
 
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
hamidsamadi
 
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - SydneySimplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Abhinav Gupta
 
Distributed Version Control Systems
Distributed Version Control SystemsDistributed Version Control Systems
Distributed Version Control Systems
Mark van Lent
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
Chen-Tien Tsai
 
Big feature - small sprint
Big feature - small sprint Big feature - small sprint
Big feature - small sprint
Igor Goldshmidt
 
Codemotion Amsterdam 2016 - The DevOps Disaster
Codemotion Amsterdam 2016 - The DevOps DisasterCodemotion Amsterdam 2016 - The DevOps Disaster
Codemotion Amsterdam 2016 - The DevOps Disaster
Bert Jan Schrijver
 
Jfokus 2017 - The DevOps Disaster
Jfokus 2017 - The DevOps Disaster Jfokus 2017 - The DevOps Disaster
Jfokus 2017 - The DevOps Disaster
Bert Jan Schrijver
 
Version control for PL/SQL
Version control for PL/SQLVersion control for PL/SQL
Version control for PL/SQL
Gerger
 
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
Puppet
 
JavaOne 2016 - The DevOps Disaster
JavaOne 2016 -  The DevOps DisasterJavaOne 2016 -  The DevOps Disaster
JavaOne 2016 - The DevOps Disaster
Bert Jan Schrijver
 

Similar to 40 square's git workflow (20)

Gitlab meets Kubernetes
Gitlab meets KubernetesGitlab meets Kubernetes
Gitlab meets Kubernetes
 
Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel development
 
Marrying Jenkins and Gerrit-Berlin Expert Days 2013
Marrying Jenkins and Gerrit-Berlin Expert Days 2013Marrying Jenkins and Gerrit-Berlin Expert Days 2013
Marrying Jenkins and Gerrit-Berlin Expert Days 2013
 
Short Introduction of software engineering for bioinformatics
Short Introduction of software engineering for bioinformatics Short Introduction of software engineering for bioinformatics
Short Introduction of software engineering for bioinformatics
 
Skip Staging! Test Docker, Helm, and Kubernetes Apps like a Pro
Skip Staging! Test Docker, Helm, and Kubernetes Apps like a ProSkip Staging! Test Docker, Helm, and Kubernetes Apps like a Pro
Skip Staging! Test Docker, Helm, and Kubernetes Apps like a Pro
 
Ntd2015_pt_kanban_ppt
Ntd2015_pt_kanban_pptNtd2015_pt_kanban_ppt
Ntd2015_pt_kanban_ppt
 
Beyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Beyond Scrum: Scaling Agile with Continuous Delivery and SubversionBeyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Beyond Scrum: Scaling Agile with Continuous Delivery and Subversion
 
Multi-QA Environment, parallel development with Git
Multi-QA Environment, parallel development with GitMulti-QA Environment, parallel development with Git
Multi-QA Environment, parallel development with Git
 
Continuous delivery @åf consult
Continuous delivery @åf consultContinuous delivery @åf consult
Continuous delivery @åf consult
 
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
 
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - SydneySimplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
 
Distributed Version Control Systems
Distributed Version Control SystemsDistributed Version Control Systems
Distributed Version Control Systems
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
Big feature - small sprint
Big feature - small sprint Big feature - small sprint
Big feature - small sprint
 
Codemotion Amsterdam 2016 - The DevOps Disaster
Codemotion Amsterdam 2016 - The DevOps DisasterCodemotion Amsterdam 2016 - The DevOps Disaster
Codemotion Amsterdam 2016 - The DevOps Disaster
 
Jfokus 2017 - The DevOps Disaster
Jfokus 2017 - The DevOps Disaster Jfokus 2017 - The DevOps Disaster
Jfokus 2017 - The DevOps Disaster
 
Git and git hub
Git and git hubGit and git hub
Git and git hub
 
Version control for PL/SQL
Version control for PL/SQLVersion control for PL/SQL
Version control for PL/SQL
 
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
 
JavaOne 2016 - The DevOps Disaster
JavaOne 2016 -  The DevOps DisasterJavaOne 2016 -  The DevOps Disaster
JavaOne 2016 - The DevOps Disaster
 

More from Ruben Tan

Basic distributed systems principles
Basic distributed systems principlesBasic distributed systems principles
Basic distributed systems principles
Ruben Tan
 
Demystifying blockchains
Demystifying blockchainsDemystifying blockchains
Demystifying blockchains
Ruben Tan
 
Banking on blockchains
Banking on blockchainsBanking on blockchains
Banking on blockchains
Ruben Tan
 
Consensus in distributed computing
Consensus in distributed computingConsensus in distributed computing
Consensus in distributed computing
Ruben Tan
 
Leveraging zeromq for node.js
Leveraging zeromq for node.jsLeveraging zeromq for node.js
Leveraging zeromq for node.js
Ruben Tan
 
Defensive programming in Javascript and Node.js
Defensive programming in Javascript and Node.jsDefensive programming in Javascript and Node.js
Defensive programming in Javascript and Node.js
Ruben Tan
 
Client-side storage
Client-side storageClient-side storage
Client-side storage
Ruben Tan
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqRuben Tan
 
NodeHack #2 - MVP
NodeHack #2 - MVPNodeHack #2 - MVP
NodeHack #2 - MVP
Ruben Tan
 
Unit testing for 40 square software
Unit testing for 40 square softwareUnit testing for 40 square software
Unit testing for 40 square softwareRuben Tan
 

More from Ruben Tan (10)

Basic distributed systems principles
Basic distributed systems principlesBasic distributed systems principles
Basic distributed systems principles
 
Demystifying blockchains
Demystifying blockchainsDemystifying blockchains
Demystifying blockchains
 
Banking on blockchains
Banking on blockchainsBanking on blockchains
Banking on blockchains
 
Consensus in distributed computing
Consensus in distributed computingConsensus in distributed computing
Consensus in distributed computing
 
Leveraging zeromq for node.js
Leveraging zeromq for node.jsLeveraging zeromq for node.js
Leveraging zeromq for node.js
 
Defensive programming in Javascript and Node.js
Defensive programming in Javascript and Node.jsDefensive programming in Javascript and Node.js
Defensive programming in Javascript and Node.js
 
Client-side storage
Client-side storageClient-side storage
Client-side storage
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
 
NodeHack #2 - MVP
NodeHack #2 - MVPNodeHack #2 - MVP
NodeHack #2 - MVP
 
Unit testing for 40 square software
Unit testing for 40 square softwareUnit testing for 40 square software
Unit testing for 40 square software
 

Recently uploaded

Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
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
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
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
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
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
 
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
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
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
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
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
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
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
 

Recently uploaded (20)

Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
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
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
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...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.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
 
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
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
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
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
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
 

40 square's git workflow

  • 1. 40 Square’s GIT Workflow Who Am I? Lead developer in 40 square software First Love: 6 years in Java (omfg what was I thinking) Ex-GF: PHP hobbyist turned full time engineer Wife: Node.JS, and Javascript in general Twitter: @roguejs This will be a warp speed presentation!
  • 2. Mercurial vs Git We used fogbugz + kiln initially Started off with feature branches Merging conflicts took forever REAL REASON: Bad practices HIDDEN REASON: Fogbugz is expensive...
  • 3. Other annoyances No dry runs Difficult to do code review No cherry-picking Bad planning and structure Branching is expensive?
  • 4. Our Deployment Process LDC Dev C1 LDC B1 push hg pull CDC Dev repo B Branches CDC Dev - qa C - master
  • 5. Deployment Problems Accidentally merge into master? RED ALERT QA testing on old code Dev: “Is my feature merged yet?” Lead: “Hold on, I’m fixing conflict #13285582309583” live dev1 invalidates previous test dev2
  • 6. Why Git? Because github is sexy Actually, because it’s cheaper than Kiln Why not bitbucket? Because github is sexy, and because I said so Actually, because github still is cheaper (repo vs users) Git has more options for branching and merging
  • 7. Our Goals Have a staging server that is a clone of live server Abstract devs from live server No more “it’s just one line of code, can I push to live directly?” Rapid deployment and lesser merge conflicts Build better practices
  • 8. Vincent Driessen Model 40 square style Long Running Branches: master - live servers staging - last line of defense devel - weekly deployments Distributed blessed repo model Blessed repo managed by integrators Each dev gets own fork
  • 9. Forking Model & Policy Your own fork is your own responsibility Feel free to force update your own fork Rebase before sending pull requests
  • 10. Typical Workflow (dev) Dev starts work on an issue in Pivotal Determine what kind of issue: P1- branch off from staging Bugs & Features - branch off from devel Pull upstream often and rebase on upstream Rebase again before sending pull request
  • 11. Typical Workflow (dev) git fetch --all (git version 1.7.x) git branch --track up-devel upstream/devel git branch P1-1305 up-devel git fetch upstream devel git checkout up-devel git merge upstream/devel git checkout P1-1305 git rebase up-devel
  • 12. Typical Workflow (integrator) Integrator receives pull request Create a new branch in blessed repo Pull update into that branch Review code Merge into staging/devel
  • 13. Typical Workflow (Integrator) git branch soggie-P1-1305 devel git checkout soggie-P1-1305 git pull soggie P1-1305 git rebase devel git checkout devel git merge soggie-P1-1305 git push origin devel:devel
  • 14. Overall Workflow LDC Dev C1 LDC git B1 repo push git git pull CDC Dev repo integrate repo B git CDC repo Dev C
  • 15. Timeline View Black line = master Blue line = staging Green line = dev
  • 16. Devel branch deployment Every MONDAY, merge to staging Once testing completes, tag and merge to master If testing fails, all bug fixes are designated as P1 Bug fixes for release candidate is merged into staging master fail staging fix devel
  • 17. Staging branch deployment Merge to staging and test Once QA approves it, merge to master AND devel Policy: Only one commit allowed to dangle master never!!! staging devel
  • 18. Policies Do NOT force update blessed repo I will hunt you down, and kill you Always rebase before sending pull request If P1, branch off staging. Otherwise, branch off devel Manage pull requests NOW No dangling commits on staging
  • 19. Benefits Established workflow = peaceful work environment Predictable integration & deployment Conflicts = dev responsibility instead of integrator’s Can dick around with own repo without killing blessed repo No more unpredictable testing environment
  • 20. More Information A successful branching model http://nvie.com/posts/a-successful-git-branching- model/ Git http://git-scm.com/ Github http://github.com/ Git video tutorials http://gitcasts.com/

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n