SlideShare a Scribd company logo
1 of 26
15 février 2018
GIT
FLOWS
UN PEU D’HISTOIRE
2
3
UN PEU D’HISTOIRE
QUIZZ
QUI A INVENTÉ GIT ?
QUAND ?
POURQUOI ?
GIT CA VEUT DIRE QUOI ?
4
GROSSES DIFFERENCES AVEC SUBVERSION
1. A LA BASE CA N’EST PAS UN VCS
2. DÉCENTRALISÉ
 ON PEUT BOSSER EN LOCAL SANS INTERNET !
 CRÉER DES BRANCHES SANS LES POUSSER
 ETC…
3. PAS DE MODÈLE DE BRANCHE PRÉÉTABLI
 LIBERTÉ TOTALE DE WORKFLOW !
MODÈLES DE BRANCHE
5
6
POURQUOI UTILISER UN MODÈLE DE BRANCHE ?
?
7
POURQUOI UTILISER UN MODÈLE DE BRANCHE ?
8
POURQUOI UTILISER UN MODÈLE DE BRANCHE ?
9
POURQUOI UTILISER UN MODÈLE DE BRANCHE ?
10
POURQUOI UTILISER UN MODÈLE DE BRANCHE ?
NO-FLOW
11
GITFLOW
12
13
GITFLOW
EXPOSÉ EN 2010 PAR VINCENT DRIESSEN
« A SUCCESSFUL GIT BRANCHING
MODEL »
HTTP://NVIE.COM/POSTS/A-SUCCESSFUL-GIT-BRANCHING-
MODEL/
14
GITFLOW BRANCHES
1. BRANCHES PRINCIPALES :
 MASTER EST LA BRANCHE OÙ TOUT EST STABLE. CHAQUE COMMIT CORRESPOND À UNE
VERSION STABLE DU PROJET (RELEASE) QUI PEUT ÊTRE DÉPLOYÉE EN PRODUCTION ET
TAGUÉE EN CONSÉQUENCE (VX.Y.Z).
 DEVELOP EST LA BRANCHE SUR LAQUELLE S’EFFECTUE LE DÉVELOPPEMENT
PROPREMENT DIT. ON Y PRÉPARE LES CHANGEMENTS EN VUE DE LA PROCHAINE
RELEASE DANS MASTER.
2. BRANCHES SECONDAIRES :
 FEATURE PART DE DEVELOP ET SE MERGE DANS DEVELOP.
 RELEASE PART DE DEVELOP ET SE MERGE DANS MASTER ET DEVELOP.
 HOTFIX PART DE MASTER ET SE MERGE DANS MASTER ET DEVELOP OU RELEASE (SI
ELLE EXISTE).
15
GITFLOW SCHEMA
GITHUB FLOW
16
17
GITHUB FLOW
CRÉÉ PAR SCOTT CHACON EN 2011 CAR :
• GITHUB DÉPLOIE « TOUT LE TEMPS »
• ILS N’ONT PAS DE « RELEASE »
6 RÈGLES
 TOUT CE QUI EST DANS MASTER PEUT ÊTRE DÉPLOYÉ EN PRODUCTION
 CRÉER DES BRANCHES EXPLICITES DEPUIS MASTER (FEATURES)
 POUSSER SUR ORIGIN RÉGULIÈREMENT
 OUVRIR UNE PULL-REQUEST À TOUT MOMENT
 FUSIONNER SEULEMENT APRÈS UNE PULL-REQUEST REVIEW
 DÉPLOYER IMMÉDIATEMENT APRÈS MERGE DANS MASTER
18
GITHUB FLOW
AVANTAGES / INCONVENIENTS
 PAS VRAIMENT DE VERSION
 FORTEMENT BASÉ SUR LES PULLS REQUESTS
 PERMET D’INTRODUIRE PEU DE BUGS SIMULTANÉMENT ET DE LES CORRIGER
RAPIDEMENT.
 ADAPTÉ AU CD, AUX FEATURES TEAM
 NÉCESSITE DES TESTS AUTOMATISÉS ET UNE PROCÉDURE DE ROLLBACK DE VERSION
GITLAB FLOW
19
20
GITLAB FLOW
ENSEMBLE DE 11 BEST PRACTICES
 USE FEATURE BRANCHES, NO DIRECT COMMITS ON MASTER.
 TEST ALL COMMITS, NOT ONLY ONES ON MASTER.
 RUN ALL THE TESTS ON ALL COMMITS (IF YOUR TESTS RUN LONGER THAN 5 MINUTES
HAVE THEM RUN IN PARALLEL).
 PERFORM CODE REVIEWS BEFORE MERGES INTO MASTER, NOT AFTERWARDS.
 DEPLOYMENTS ARE AUTOMATIC, BASED ON BRANCHES OR TAGS.
 TAGS ARE SET BY THE USER, NOT BY CI.
 RELEASES ARE BASED ON TAGS.
 PUSHED COMMITS ARE NEVER REBASED.
 EVERYONE STARTS FROM MASTER, AND TARGETS MASTER.
 FIX BUGS IN MASTER FIRST AND RELEASE BRANCHES SECOND.
 COMMIT MESSAGES REFLECT INTENT.
21
GITLAB FLOW
SEMVER
22
23
SEMANTIC VERSIONING
TOM PRESTON-WERNER (GRAVATARS, GITHUB).
MAJOR.MINOR.PATCH
 MAJOR VERSION WHEN YOU MAKE INCOMPATIBLE API CHANGES,
 MINOR VERSION WHEN YOU ADD FUNCTIONALITY IN A BACKWARDS-COMPATIBLE
MANNER
 PATCH VERSION WHEN YOU MAKE BACKWARDS-COMPATIBLE BUG FIXES.
VERSIONS PARTICULIÈRES :
 0.1.0 : PREMIÈRE VERSION DE DEV
 1.0.0 : PREMIÈRE VERSION EN PRODUCTION
 100.0.0 : IMPOSSIBLE CAR IL NE FAUT PAS CASSER L’API TROP FRÉQUEMMENT.
BONUS :
REBASE OR
NOT REBASE ?
24
25
REBASE OR NOT REBASE ?
Q&A
26

More Related Content

Recently uploaded

Recently uploaded (20)

WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid Environments
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Git branching

  • 3. 3 UN PEU D’HISTOIRE QUIZZ QUI A INVENTÉ GIT ? QUAND ? POURQUOI ? GIT CA VEUT DIRE QUOI ?
  • 4. 4 GROSSES DIFFERENCES AVEC SUBVERSION 1. A LA BASE CA N’EST PAS UN VCS 2. DÉCENTRALISÉ  ON PEUT BOSSER EN LOCAL SANS INTERNET !  CRÉER DES BRANCHES SANS LES POUSSER  ETC… 3. PAS DE MODÈLE DE BRANCHE PRÉÉTABLI  LIBERTÉ TOTALE DE WORKFLOW !
  • 6. 6 POURQUOI UTILISER UN MODÈLE DE BRANCHE ? ?
  • 7. 7 POURQUOI UTILISER UN MODÈLE DE BRANCHE ?
  • 8. 8 POURQUOI UTILISER UN MODÈLE DE BRANCHE ?
  • 9. 9 POURQUOI UTILISER UN MODÈLE DE BRANCHE ?
  • 10. 10 POURQUOI UTILISER UN MODÈLE DE BRANCHE ?
  • 13. 13 GITFLOW EXPOSÉ EN 2010 PAR VINCENT DRIESSEN « A SUCCESSFUL GIT BRANCHING MODEL » HTTP://NVIE.COM/POSTS/A-SUCCESSFUL-GIT-BRANCHING- MODEL/
  • 14. 14 GITFLOW BRANCHES 1. BRANCHES PRINCIPALES :  MASTER EST LA BRANCHE OÙ TOUT EST STABLE. CHAQUE COMMIT CORRESPOND À UNE VERSION STABLE DU PROJET (RELEASE) QUI PEUT ÊTRE DÉPLOYÉE EN PRODUCTION ET TAGUÉE EN CONSÉQUENCE (VX.Y.Z).  DEVELOP EST LA BRANCHE SUR LAQUELLE S’EFFECTUE LE DÉVELOPPEMENT PROPREMENT DIT. ON Y PRÉPARE LES CHANGEMENTS EN VUE DE LA PROCHAINE RELEASE DANS MASTER. 2. BRANCHES SECONDAIRES :  FEATURE PART DE DEVELOP ET SE MERGE DANS DEVELOP.  RELEASE PART DE DEVELOP ET SE MERGE DANS MASTER ET DEVELOP.  HOTFIX PART DE MASTER ET SE MERGE DANS MASTER ET DEVELOP OU RELEASE (SI ELLE EXISTE).
  • 17. 17 GITHUB FLOW CRÉÉ PAR SCOTT CHACON EN 2011 CAR : • GITHUB DÉPLOIE « TOUT LE TEMPS » • ILS N’ONT PAS DE « RELEASE » 6 RÈGLES  TOUT CE QUI EST DANS MASTER PEUT ÊTRE DÉPLOYÉ EN PRODUCTION  CRÉER DES BRANCHES EXPLICITES DEPUIS MASTER (FEATURES)  POUSSER SUR ORIGIN RÉGULIÈREMENT  OUVRIR UNE PULL-REQUEST À TOUT MOMENT  FUSIONNER SEULEMENT APRÈS UNE PULL-REQUEST REVIEW  DÉPLOYER IMMÉDIATEMENT APRÈS MERGE DANS MASTER
  • 18. 18 GITHUB FLOW AVANTAGES / INCONVENIENTS  PAS VRAIMENT DE VERSION  FORTEMENT BASÉ SUR LES PULLS REQUESTS  PERMET D’INTRODUIRE PEU DE BUGS SIMULTANÉMENT ET DE LES CORRIGER RAPIDEMENT.  ADAPTÉ AU CD, AUX FEATURES TEAM  NÉCESSITE DES TESTS AUTOMATISÉS ET UNE PROCÉDURE DE ROLLBACK DE VERSION
  • 20. 20 GITLAB FLOW ENSEMBLE DE 11 BEST PRACTICES  USE FEATURE BRANCHES, NO DIRECT COMMITS ON MASTER.  TEST ALL COMMITS, NOT ONLY ONES ON MASTER.  RUN ALL THE TESTS ON ALL COMMITS (IF YOUR TESTS RUN LONGER THAN 5 MINUTES HAVE THEM RUN IN PARALLEL).  PERFORM CODE REVIEWS BEFORE MERGES INTO MASTER, NOT AFTERWARDS.  DEPLOYMENTS ARE AUTOMATIC, BASED ON BRANCHES OR TAGS.  TAGS ARE SET BY THE USER, NOT BY CI.  RELEASES ARE BASED ON TAGS.  PUSHED COMMITS ARE NEVER REBASED.  EVERYONE STARTS FROM MASTER, AND TARGETS MASTER.  FIX BUGS IN MASTER FIRST AND RELEASE BRANCHES SECOND.  COMMIT MESSAGES REFLECT INTENT.
  • 23. 23 SEMANTIC VERSIONING TOM PRESTON-WERNER (GRAVATARS, GITHUB). MAJOR.MINOR.PATCH  MAJOR VERSION WHEN YOU MAKE INCOMPATIBLE API CHANGES,  MINOR VERSION WHEN YOU ADD FUNCTIONALITY IN A BACKWARDS-COMPATIBLE MANNER  PATCH VERSION WHEN YOU MAKE BACKWARDS-COMPATIBLE BUG FIXES. VERSIONS PARTICULIÈRES :  0.1.0 : PREMIÈRE VERSION DE DEV  1.0.0 : PREMIÈRE VERSION EN PRODUCTION  100.0.0 : IMPOSSIBLE CAR IL NE FAUT PAS CASSER L’API TROP FRÉQUEMMENT.
  • 24. BONUS : REBASE OR NOT REBASE ? 24
  • 25. 25 REBASE OR NOT REBASE ?

Editor's Notes

  1. maven