SlideShare a Scribd company logo

Introduction to Git Source Control

The following is a video of me giving this presentation: https://youtu.be/Dom8jcRqEX0 Introduction to basic source control concepts in combination with how they are related to Git.

1 of 18
Download to read offline
Source Control
Basics
What is Source Control?
1 public static void main(String[] args) {
2 int a = Integer.parseInt(args[0]);
3 int b = Integer.parseInt(args[1]);
4 }
1 public static void main(String[] args) {
2 int a = Integer.parseInt(args[0]);
3 int b = Integer.parseInt(args[1]);
4 }
5
6 public int add(int a, int b) {
7 return a + b;
8 }
Change 1 Change 2
Why do we have Source Control?
1 public static void main(String[] args) {
2 int a = Integer.parseInt(args[0]);
3 int b = Integer.parseInt(args[1]);
4 }
5
6 public int add(int a, int b) {
7 return a + b;
8 }
1 public static void main(String[] args) {
2 int a = Integer.parseInt(args[0]);
3 int b = Integer.parseInt(args[1]);
4 int c = a + b;
5 System.out.println(c + “”);
6 }
7
Person 1 Person 2
Why does conflict matter?
It resulted in branching strategies for:
● Protected the codebase
● Protected the environments
● Avoiding conflict
● Knowing what went where
● Being able to get back to a stable state
All these strategies are varying degrees of wrong
Why Git?
● It dominates the market
● Most all are conceptually
similar
● It is probably what you are
already using
Git Architecture
Ad

Recommended

Fnt software solutions placement paper
Fnt software solutions placement paperFnt software solutions placement paper
Fnt software solutions placement paperfntsofttech
 
Getting started cpp full
Getting started cpp   fullGetting started cpp   full
Getting started cpp fullVõ Hòa
 
Java_Programming_by_Example_6th_Edition.pdf
Java_Programming_by_Example_6th_Edition.pdfJava_Programming_by_Example_6th_Edition.pdf
Java_Programming_by_Example_6th_Edition.pdfJayveeCultivo
 
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsReverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsAsuka Nakajima
 
Java simple programs
Java simple programsJava simple programs
Java simple programsVEERA RAGAVAN
 
Nested For Loops and Class Constants in Java
Nested For Loops and Class Constants in JavaNested For Loops and Class Constants in Java
Nested For Loops and Class Constants in JavaPokequesthero
 

More Related Content

Similar to Introduction to Git Source Control

Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaanwalia Shaan
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple ProgramsUpender Upr
 
Sorter class contains static methods for bubble sort, .pdf
   Sorter class contains static methods for bubble sort,  .pdf   Sorter class contains static methods for bubble sort,  .pdf
Sorter class contains static methods for bubble sort, .pdfannaipowerelectronic
 
pytest로 파이썬 코드 테스트하기
pytest로 파이썬 코드 테스트하기pytest로 파이썬 코드 테스트하기
pytest로 파이썬 코드 테스트하기Yeongseon Choe
 
Pj01 4-operators and control flow
Pj01 4-operators and control flowPj01 4-operators and control flow
Pj01 4-operators and control flowSasidharaRaoMarrapu
 
Entity System Architecture with Unity - Unity User Group Berlin
Entity System Architecture with Unity - Unity User Group BerlinEntity System Architecture with Unity - Unity User Group Berlin
Entity System Architecture with Unity - Unity User Group BerlinSimon Schmid
 
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid Wooga
 
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrainsit-people
 
Java program-to-add-two-matrices
Java program-to-add-two-matricesJava program-to-add-two-matrices
Java program-to-add-two-matricesUniversity of Essex
 
Java 8 lambda expressions
Java 8 lambda expressionsJava 8 lambda expressions
Java 8 lambda expressionsLogan Chien
 
DS LAB RECORD.docx
DS LAB RECORD.docxDS LAB RECORD.docx
DS LAB RECORD.docxdavinci54
 
Object oriented programming (first)
Object oriented programming (first)Object oriented programming (first)
Object oriented programming (first)Hvatrex Hamam
 
Workshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen TatarynovWorkshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen TatarynovFwdays
 
IT 401 Assignment 2 Deadline Monday 452015 .docx
IT 401 Assignment 2  Deadline Monday 452015    .docxIT 401 Assignment 2  Deadline Monday 452015    .docx
IT 401 Assignment 2 Deadline Monday 452015 .docxpriestmanmable
 
Update on C++ Core Guidelines Lifetime Analysis. Gábor Horváth. CoreHard Spri...
Update on C++ Core Guidelines Lifetime Analysis. Gábor Horváth. CoreHard Spri...Update on C++ Core Guidelines Lifetime Analysis. Gábor Horváth. CoreHard Spri...
Update on C++ Core Guidelines Lifetime Analysis. Gábor Horváth. CoreHard Spri...corehard_by
 

Similar to Introduction to Git Source Control (20)

Java Language fundamental
Java Language fundamentalJava Language fundamental
Java Language fundamental
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaan
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple Programs
 
Sam wd programs
Sam wd programsSam wd programs
Sam wd programs
 
Sorter class contains static methods for bubble sort, .pdf
   Sorter class contains static methods for bubble sort,  .pdf   Sorter class contains static methods for bubble sort,  .pdf
Sorter class contains static methods for bubble sort, .pdf
 
pytest로 파이썬 코드 테스트하기
pytest로 파이썬 코드 테스트하기pytest로 파이썬 코드 테스트하기
pytest로 파이썬 코드 테스트하기
 
Pj01 4-operators and control flow
Pj01 4-operators and control flowPj01 4-operators and control flow
Pj01 4-operators and control flow
 
Entity System Architecture with Unity - Unity User Group Berlin
Entity System Architecture with Unity - Unity User Group BerlinEntity System Architecture with Unity - Unity User Group Berlin
Entity System Architecture with Unity - Unity User Group Berlin
 
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
 
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
 
Java program-to-add-two-matrices
Java program-to-add-two-matricesJava program-to-add-two-matrices
Java program-to-add-two-matrices
 
Java 8 lambda expressions
Java 8 lambda expressionsJava 8 lambda expressions
Java 8 lambda expressions
 
Intro
IntroIntro
Intro
 
DS LAB RECORD.docx
DS LAB RECORD.docxDS LAB RECORD.docx
DS LAB RECORD.docx
 
Object oriented programming (first)
Object oriented programming (first)Object oriented programming (first)
Object oriented programming (first)
 
arrays
arraysarrays
arrays
 
Workshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen TatarynovWorkshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
 
IT 401 Assignment 2 Deadline Monday 452015 .docx
IT 401 Assignment 2  Deadline Monday 452015    .docxIT 401 Assignment 2  Deadline Monday 452015    .docx
IT 401 Assignment 2 Deadline Monday 452015 .docx
 
Java 5 and 6 New Features
Java 5 and 6 New FeaturesJava 5 and 6 New Features
Java 5 and 6 New Features
 
Update on C++ Core Guidelines Lifetime Analysis. Gábor Horváth. CoreHard Spri...
Update on C++ Core Guidelines Lifetime Analysis. Gábor Horváth. CoreHard Spri...Update on C++ Core Guidelines Lifetime Analysis. Gábor Horváth. CoreHard Spri...
Update on C++ Core Guidelines Lifetime Analysis. Gábor Horváth. CoreHard Spri...
 

More from John Valentino

Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerJohn Valentino
 
Introduction to Gradle
Introduction to GradleIntroduction to Gradle
Introduction to GradleJohn Valentino
 
Benefits in Software Development
Benefits in Software DevelopmentBenefits in Software Development
Benefits in Software DevelopmentJohn Valentino
 
Researching a Software Job
Researching a Software JobResearching a Software Job
Researching a Software JobJohn Valentino
 
Interviewing as a Developer
Interviewing as a DeveloperInterviewing as a Developer
Interviewing as a DeveloperJohn Valentino
 
Developer: A Day in the Life
Developer: A Day in the LifeDeveloper: A Day in the Life
Developer: A Day in the LifeJohn Valentino
 
Quality Engineer: A Day in the Life
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the LifeJohn Valentino
 
Lead Developer: A Day in the Life
Lead Developer: A Day in the LifeLead Developer: A Day in the Life
Lead Developer: A Day in the LifeJohn Valentino
 

More from John Valentino (13)

The Path to DevOps
The Path to DevOpsThe Path to DevOps
The Path to DevOps
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Introduction to Gradle
Introduction to GradleIntroduction to Gradle
Introduction to Gradle
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Technology Stack
Technology StackTechnology Stack
Technology Stack
 
Startups 101
Startups 101Startups 101
Startups 101
 
Benefits in Software Development
Benefits in Software DevelopmentBenefits in Software Development
Benefits in Software Development
 
Researching a Software Job
Researching a Software JobResearching a Software Job
Researching a Software Job
 
Interviewing as a Developer
Interviewing as a DeveloperInterviewing as a Developer
Interviewing as a Developer
 
Developer: A Day in the Life
Developer: A Day in the LifeDeveloper: A Day in the Life
Developer: A Day in the Life
 
Agile 101
Agile 101Agile 101
Agile 101
 
Quality Engineer: A Day in the Life
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the Life
 
Lead Developer: A Day in the Life
Lead Developer: A Day in the LifeLead Developer: A Day in the Life
Lead Developer: A Day in the Life
 

Recently uploaded

SPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementSPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementISPMAIndia
 
The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!ISPMAIndia
 
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...emili denli
 
Self scaling Multi cloud nomad workloads
Self scaling Multi cloud nomad workloadsSelf scaling Multi cloud nomad workloads
Self scaling Multi cloud nomad workloadsBram Vogelaar
 
Embracing Change - The Impact of Generative AI on Strategic Portfolio Management
Embracing Change - The Impact of Generative AI on Strategic Portfolio ManagementEmbracing Change - The Impact of Generative AI on Strategic Portfolio Management
Embracing Change - The Impact of Generative AI on Strategic Portfolio ManagementOnePlan Solutions
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriISPMAIndia
 
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdfAUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdfAutokey
 
maximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsmaximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsssuser82c38d
 
killing camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfkilling camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfssuser82c38d
 
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ..."Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...ISPMAIndia
 
P1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetP1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetMatthewTHawley
 
Les02 Restricting and Sorting Data using SQL.ppt
Les02 Restricting and Sorting Data using SQL.pptLes02 Restricting and Sorting Data using SQL.ppt
Les02 Restricting and Sorting Data using SQL.pptDrZeeshanBhatti
 
Getting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptxGetting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptxmavinoikein
 
App Builder - Hierarchical Data Apps.pptx
App Builder - Hierarchical Data Apps.pptxApp Builder - Hierarchical Data Apps.pptx
App Builder - Hierarchical Data Apps.pptxPoojitha B
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...confluent
 
sql ppt for students who preparing for sql
sql ppt for students who preparing for sqlsql ppt for students who preparing for sql
sql ppt for students who preparing for sqlbharatjanadharwarud
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이ssuser82c38d
 
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A..."Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...ISPMAIndia
 
Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Asher Sterkin
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkTimothy Spann
 

Recently uploaded (20)

SPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementSPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product Management
 
The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!
 
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
 
Self scaling Multi cloud nomad workloads
Self scaling Multi cloud nomad workloadsSelf scaling Multi cloud nomad workloads
Self scaling Multi cloud nomad workloads
 
Embracing Change - The Impact of Generative AI on Strategic Portfolio Management
Embracing Change - The Impact of Generative AI on Strategic Portfolio ManagementEmbracing Change - The Impact of Generative AI on Strategic Portfolio Management
Embracing Change - The Impact of Generative AI on Strategic Portfolio Management
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit Bendigiri
 
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdfAUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
AUTOKEYUNLOCKER-BRANDS-SUPPORT-STANDARD-VERSION.pdf
 
maximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsmaximum subarray ppt for killing camp students
maximum subarray ppt for killing camp students
 
killing camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfkilling camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdf
 
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ..."Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
 
P1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetP1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 Smartsheet
 
Les02 Restricting and Sorting Data using SQL.ppt
Les02 Restricting and Sorting Data using SQL.pptLes02 Restricting and Sorting Data using SQL.ppt
Les02 Restricting and Sorting Data using SQL.ppt
 
Getting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptxGetting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptx
 
App Builder - Hierarchical Data Apps.pptx
App Builder - Hierarchical Data Apps.pptxApp Builder - Hierarchical Data Apps.pptx
App Builder - Hierarchical Data Apps.pptx
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
 
sql ppt for students who preparing for sql
sql ppt for students who preparing for sqlsql ppt for students who preparing for sql
sql ppt for students who preparing for sql
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
 
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A..."Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
 
Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
 

Introduction to Git Source Control

  • 2. What is Source Control? 1 public static void main(String[] args) { 2 int a = Integer.parseInt(args[0]); 3 int b = Integer.parseInt(args[1]); 4 } 1 public static void main(String[] args) { 2 int a = Integer.parseInt(args[0]); 3 int b = Integer.parseInt(args[1]); 4 } 5 6 public int add(int a, int b) { 7 return a + b; 8 } Change 1 Change 2
  • 3. Why do we have Source Control? 1 public static void main(String[] args) { 2 int a = Integer.parseInt(args[0]); 3 int b = Integer.parseInt(args[1]); 4 } 5 6 public int add(int a, int b) { 7 return a + b; 8 } 1 public static void main(String[] args) { 2 int a = Integer.parseInt(args[0]); 3 int b = Integer.parseInt(args[1]); 4 int c = a + b; 5 System.out.println(c + “”); 6 } 7 Person 1 Person 2
  • 4. Why does conflict matter? It resulted in branching strategies for: ● Protected the codebase ● Protected the environments ● Avoiding conflict ● Knowing what went where ● Being able to get back to a stable state All these strategies are varying degrees of wrong
  • 5. Why Git? ● It dominates the market ● Most all are conceptually similar ● It is probably what you are already using
  • 7. Cloning 1 public static void main(String[] args) { 2 int a = Integer.parseInt(args[0]); 3 int b = Integer.parseInt(args[1]); 4 } 1 public static void main(String[] args) { 2 int a = Integer.parseInt(args[0]); 3 int b = Integer.parseInt(args[1]); 4 } 5 6 public int add(int a, int b) { 7 return a + b; 8 } clone master (remote) master (working) File System
  • 8. Commit and Push clone master (remote) master (working) File System commit push
  • 14. Branches for codebase protection Purpose Severity Solutions From Developers Very Bad - Fire them, hire better - Automate standards (SCA, testing, SAST) From Other Teams Bad - Consider Pull Requests - Ban habitual offenders - Automate standards (SCA, testing, SAST) - Should this be its own component? - Should you be on the same team? From malicious actors Bad - Automate standards (SCA, testing, SAST) - Using tagging associated with releases From all developers Very Bad - DevOps
  • 15. Branches for env protection Purpose Severity Solutions From breakage Questionable - Decouple deploy from source - Test automation - Deploy automation From developers Very Bad - DevOps - Deploy automation From change Very Bad - Don’t
  • 16. Branches to avoid conflict ...is always wrong
  • 17. Branches to know what went where ...is always unnecessary master commit a000 commit b111 commit c222 Tag: 1.0.1 Tag: 1.0.2 Tag: PROD Tag: 1.0.3 Tag: STAGE
  • 18. Branches to know the stable state ...is always unnecessary master commit a000 commit b111 commit c222 Tag: 1.0.1 Tag: 1.0.2 Tag: PROD Tag: 1.0.3 Tag: STAGE

Editor's Notes

  1. 1.A way to keep track of incremental changes 2.Every change is a record unto itself 3.Stores that history in a central location 4.A common means of making code changes
  2. 1.Why do we have source control? 2.Because two people need to change the file around the same time 3.The result is conflict
  3. 1.I need to protect the codebase from the developers 2.I need to tie branches with environments so that I can protect them 3.We can’t have devs merging their own code, so we need them to avoid this 4.We need to use branches so that we know what goes into each environment 5.We need to be able to quickly get back into a stable state when it all goes wrong 6.Understanding why these strategies are wrong first requires knowledge about how source control works
  4. 1.An entire codebase is store at a remote location 2.Individual developers have their own local copies of that same repository 3.They push changes to that central repository, and pull changes made by other developers to it
  5. 1.When you clone, you are creating a local (working) copy from a remote location 2.On top of your local copy, is your own file system representation of that project 3.Any changes you make just remain on your file system, and don’t go into your working branch or get merged into the remote branch without explicit action
  6. 1.The only way your changes to into the working branch is via commit 2.You push your working branch into the remove branch via push
  7. 1.Master/main/mainline represents the true source 2.Each branch is a copy of the mainline at the time it is created 3.Work occurs on a branch without impacting the source branch
  8. 1.The underlying intention is to merge dev-1 back into master 2.This is best done via a Pull request, which acts like a temporary branch off of master that represents a merger of the two code bases 3.PRs can be merged automatically or require various approvals and other checks prior to be merged. 4.Another option is to either close the original branch, or leave it open
  9. 1.We have a manual approval 2.We are deleting the source branch after merger
  10. 1.Developers – The story about my first “DevOps” meeting at a new company, where it was stated “we don’t’ trust our developers” 2.Teams – This is a process, architecture, and automation problem 3.Bad actors – Very rare, but that is why tools exist. Otherwise just go back to a tagged release 4.RM in bad practice – the story
  11. 1.Env branching is generally a workaround because of a lack of automation 2.As a developer, I don’t write code that I don’t deploy. Integration and deployment is half the work. 3.The purpose of an environment is to change, so this is impossible
  12. 1.You are always just delaying the same conflict 2.Instead of dealing with them one at a time, you now have dozens and maybe even hundreds 3.This is known as anti-CI
  13. 1.Using branches to represent release is a holdover from older SCM systems like CVS and SVN 2.Tagging is your friend, because it can be used to track both what is releasable and where it was released to 3.Consider that tags are not specific to branch, but commit, which means they can be from anywhere 4.This is a key strategy when considering how to decouple coding from release
  14. Just like last slide