SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Git
From basics to workflows
What is Version Control?
Version Control (or Revision Control) allows
tracking of changes throughout a collection of
files.
These files can be anything, but they are
typically used to track changes of files
containing code.
How does it work?
Most people know
version control in a
centralized model
(CVS, SVN), in that a
single repository
contains and controls
all change records,
logs, and other data
associated with the
project.
Master
John
Jane
Josh
What's wrong with this model?
If the master server is
down or network
connectivity is limited
to nonexistent, the
client cannot commit
new changes nor
typically access past
revisions, remote
branches, or other
information not stored
or cached locally.
Master
John
Jane
Josh
I'm helpless
Git is different
Distribution solves the
problem by making
the client and the
server the same,
ensuring everyone
has a full copy of the
Repository and any
changes made go to
the local one first
before being "pushed"
to others.
Master
John
Jane
Josh
Git is different (cont.)
This allows full, bi-
directional
communication
between any two
repos. In addition,
work is committed
locally prior to sending
off the changes to
anyone else.
Master
John
Jane
Josh
Git is different (cont.)
However, most
implementations of git
infrastructure call for a
master repository to
which contributors will
work on, similar to the
centralized model, but
ensuring each client
has exactly the same
data as the server.
Master
John
Jane
Josh
Using Git
git init
git add <file1> [...]
git commit -m "msg"
git push <remote> <branch>
git pull <remote> <branch>
git branch <branch>
git checkout <branch>
git merge <branch>
git log
git tag <tagname>
Initialize a Repository
Add File to stage area
Commit staged files
Push updates to remote
Pull remote updates
Create a new branch
Change current branch
Merge branch into current
View commit activity
Tag current state
Branches
● Are cheap
● Are local unless
pushed
● Can be merged into
each other
Branch Workflows
One common
workflow is to have a
master and develop
branch. master has
stable code, develop
is code that might not
be stable.
Programmers will
commit and push to
the develop branch
and some sort of
project leadership will
merge the develop
branch into the
master when the
time comes for a
release.
Branch Workflows (cont.)
This red line represents the master branch's
history.
master
Branch Workflows (cont.)
The blue line is the develop branch.
master
develop
Branch Workflows (cont.)
Each dot is a commit
master
develop
John:
Fixed bug
#223
Jane:
Added
Widget
Josh:
Cleaned up
doc/
directory
Branch Workflows (cont.)
Each arrow is a merge into master
master
develop
John:
Merged
develop
into master
John:
Merged
develop
into master
John:
Merged
develop
into master
Branch Workflows (cont.)
And each square is a tag
master
develop
John
Tagged:
v1.0
John
Tagged:
v1.1
John
Tagged:
v1.2
Branch Workflows (cont.)
This is the most common workflow for working
in teams. The master server will see this the
most.
master
develop
Branch Workflows (cont.)
As presented, this model is kind of limited, as
it forces everyone to put code in development
on the develop branch.
master
develop
mail-unstable
Branch Workflows (cont.)
Members of projects can create unstable
branches, branched off the develop branch, to
work on features that will make the develop
codebase unstable.
master
develop
(Delete branch)
mail-unstable
Branch Workflows (cont.)
Sometimes, however, you might need to do a
hotfix, which bypasses the typical
development cycle. This is used sparingly,
and is typically reserved for security issues.
master
develop
(Delete branch)
(Delete branch)

Contenu connexe

Tendances

NSF to PST Converter
NSF to PST ConverterNSF to PST Converter
NSF to PST Convertercolleenlopez
 
Flyway _ A Database Version Management Tool
Flyway _ A Database Version Management ToolFlyway _ A Database Version Management Tool
Flyway _ A Database Version Management ToolKnoldus Inc.
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitRobert Lee-Cann
 
qTest <> TestProject Integration Webinar
qTest <> TestProject Integration WebinarqTest <> TestProject Integration Webinar
qTest <> TestProject Integration WebinarKevin Dunne
 
JOIN 2021 Testable and reusable build automation Using Tekton
JOIN 2021 Testable and reusable build automation Using TektonJOIN 2021 Testable and reusable build automation Using Tekton
JOIN 2021 Testable and reusable build automation Using TektonPieter Vincken
 
Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Rafael Camacho Dejay
 
Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Malcolm Groves
 
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus Binary Studio
 
Uop ntc 405 week 1 individual hands
Uop ntc 405 week 1 individual handsUop ntc 405 week 1 individual hands
Uop ntc 405 week 1 individual handsuopassignment
 

Tendances (13)

NSF to PST Converter
NSF to PST ConverterNSF to PST Converter
NSF to PST Converter
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Flyway _ A Database Version Management Tool
Flyway _ A Database Version Management ToolFlyway _ A Database Version Management Tool
Flyway _ A Database Version Management Tool
 
Convert nsf to pst
Convert nsf to pst Convert nsf to pst
Convert nsf to pst
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
 
qTest <> TestProject Integration Webinar
qTest <> TestProject Integration WebinarqTest <> TestProject Integration Webinar
qTest <> TestProject Integration Webinar
 
JOIN 2021 Testable and reusable build automation Using Tekton
JOIN 2021 Testable and reusable build automation Using TektonJOIN 2021 Testable and reusable build automation Using Tekton
JOIN 2021 Testable and reusable build automation Using Tekton
 
GIT
GITGIT
GIT
 
Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01
 
Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101
 
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
Introduction to DevOps. Continuous Integration by Myroslav Dmytrus
 
Uop ntc 405 week 1 individual hands
Uop ntc 405 week 1 individual handsUop ntc 405 week 1 individual hands
Uop ntc 405 week 1 individual hands
 
Sas 9.2 eg migration v1
Sas 9.2 eg migration v1Sas 9.2 eg migration v1
Sas 9.2 eg migration v1
 

En vedette

Pentatônica menor (bass trombone & tuba)
Pentatônica menor (bass trombone & tuba)Pentatônica menor (bass trombone & tuba)
Pentatônica menor (bass trombone & tuba)Eduardo Guimarães
 
The top ten smartphones of 2013 aaaaa
The  top ten smartphones of 2013   aaaaaThe  top ten smartphones of 2013   aaaaa
The top ten smartphones of 2013 aaaaaroy_ski
 
La rentrée aldebert
La rentrée aldebertLa rentrée aldebert
La rentrée aldebertDjamila
 
The top ten smartphones of 2013 aaaaa
The  top ten smartphones of 2013   aaaaaThe  top ten smartphones of 2013   aaaaa
The top ten smartphones of 2013 aaaaaroy_ski
 
Questionnaire structure de santé 18 mai2015
Questionnaire structure de santé 18 mai2015Questionnaire structure de santé 18 mai2015
Questionnaire structure de santé 18 mai2015Augustyn Akra
 

En vedette (7)

Pentatônica menor (bass trombone & tuba)
Pentatônica menor (bass trombone & tuba)Pentatônica menor (bass trombone & tuba)
Pentatônica menor (bass trombone & tuba)
 
The top ten smartphones of 2013 aaaaa
The  top ten smartphones of 2013   aaaaaThe  top ten smartphones of 2013   aaaaa
The top ten smartphones of 2013 aaaaa
 
Teacher Training Session with Dede Wilson, Manchester June 2013
Teacher Training Session with Dede Wilson, Manchester June 2013Teacher Training Session with Dede Wilson, Manchester June 2013
Teacher Training Session with Dede Wilson, Manchester June 2013
 
La rentrée aldebert
La rentrée aldebertLa rentrée aldebert
La rentrée aldebert
 
The top ten smartphones of 2013 aaaaa
The  top ten smartphones of 2013   aaaaaThe  top ten smartphones of 2013   aaaaa
The top ten smartphones of 2013 aaaaa
 
Questionnaire structure de santé 18 mai2015
Questionnaire structure de santé 18 mai2015Questionnaire structure de santé 18 mai2015
Questionnaire structure de santé 18 mai2015
 
Zarafa
ZarafaZarafa
Zarafa
 

Similaire à Git talk

version control system (2).pptx
version control system (2).pptxversion control system (2).pptx
version control system (2).pptxDipanshuRaj19
 
How to use CVS applied to SOLab
How to use CVS applied to SOLabHow to use CVS applied to SOLab
How to use CVS applied to SOLabPablo Arriazu
 
Version Control Training - First Lego League
Version Control Training - First Lego LeagueVersion Control Training - First Lego League
Version Control Training - First Lego LeagueJeffrey T. Pollock
 
White Paper: Release This! - Tools for a Smooth Release Cycle
White Paper: Release This! - Tools for a Smooth Release CycleWhite Paper: Release This! - Tools for a Smooth Release Cycle
White Paper: Release This! - Tools for a Smooth Release CyclePerforce
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version ControlNowell Strite
 
CS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdfCS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdfalbusfons939393
 
Git basics with notes
Git basics with notesGit basics with notes
Git basics with notesSurabhi Gupta
 
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...Simplilearn
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing selfChen-Tien Tsai
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best PracticesMaidul Islam
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Simplilearn
 
Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.Bhavya Chawla
 

Similaire à Git talk (20)

Git hub_pptx
Git hub_pptxGit hub_pptx
Git hub_pptx
 
version control system (2).pptx
version control system (2).pptxversion control system (2).pptx
version control system (2).pptx
 
How to use CVS applied to SOLab
How to use CVS applied to SOLabHow to use CVS applied to SOLab
How to use CVS applied to SOLab
 
Git Tutorial
Git Tutorial Git Tutorial
Git Tutorial
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
GIT_Overview.
GIT_Overview.GIT_Overview.
GIT_Overview.
 
Version Control Training - First Lego League
Version Control Training - First Lego LeagueVersion Control Training - First Lego League
Version Control Training - First Lego League
 
White Paper: Release This! - Tools for a Smooth Release Cycle
White Paper: Release This! - Tools for a Smooth Release CycleWhite Paper: Release This! - Tools for a Smooth Release Cycle
White Paper: Release This! - Tools for a Smooth Release Cycle
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version Control
 
CS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdfCS_Note_Introduction to Git Workflow.pdf
CS_Note_Introduction to Git Workflow.pdf
 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
 
Git basics with notes
Git basics with notesGit basics with notes
Git basics with notes
 
Subversion
SubversionSubversion
Subversion
 
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
SVN Information
SVN Information  SVN Information
SVN Information
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.
 

Dernier

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 

Dernier (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Git talk

  • 1. Git From basics to workflows
  • 2. What is Version Control? Version Control (or Revision Control) allows tracking of changes throughout a collection of files. These files can be anything, but they are typically used to track changes of files containing code.
  • 3. How does it work? Most people know version control in a centralized model (CVS, SVN), in that a single repository contains and controls all change records, logs, and other data associated with the project. Master John Jane Josh
  • 4. What's wrong with this model? If the master server is down or network connectivity is limited to nonexistent, the client cannot commit new changes nor typically access past revisions, remote branches, or other information not stored or cached locally. Master John Jane Josh I'm helpless
  • 5. Git is different Distribution solves the problem by making the client and the server the same, ensuring everyone has a full copy of the Repository and any changes made go to the local one first before being "pushed" to others. Master John Jane Josh
  • 6. Git is different (cont.) This allows full, bi- directional communication between any two repos. In addition, work is committed locally prior to sending off the changes to anyone else. Master John Jane Josh
  • 7. Git is different (cont.) However, most implementations of git infrastructure call for a master repository to which contributors will work on, similar to the centralized model, but ensuring each client has exactly the same data as the server. Master John Jane Josh
  • 8. Using Git git init git add <file1> [...] git commit -m "msg" git push <remote> <branch> git pull <remote> <branch> git branch <branch> git checkout <branch> git merge <branch> git log git tag <tagname> Initialize a Repository Add File to stage area Commit staged files Push updates to remote Pull remote updates Create a new branch Change current branch Merge branch into current View commit activity Tag current state
  • 9. Branches ● Are cheap ● Are local unless pushed ● Can be merged into each other
  • 10. Branch Workflows One common workflow is to have a master and develop branch. master has stable code, develop is code that might not be stable. Programmers will commit and push to the develop branch and some sort of project leadership will merge the develop branch into the master when the time comes for a release.
  • 11. Branch Workflows (cont.) This red line represents the master branch's history. master
  • 12. Branch Workflows (cont.) The blue line is the develop branch. master develop
  • 13. Branch Workflows (cont.) Each dot is a commit master develop John: Fixed bug #223 Jane: Added Widget Josh: Cleaned up doc/ directory
  • 14. Branch Workflows (cont.) Each arrow is a merge into master master develop John: Merged develop into master John: Merged develop into master John: Merged develop into master
  • 15. Branch Workflows (cont.) And each square is a tag master develop John Tagged: v1.0 John Tagged: v1.1 John Tagged: v1.2
  • 16. Branch Workflows (cont.) This is the most common workflow for working in teams. The master server will see this the most. master develop
  • 17. Branch Workflows (cont.) As presented, this model is kind of limited, as it forces everyone to put code in development on the develop branch. master develop
  • 18. mail-unstable Branch Workflows (cont.) Members of projects can create unstable branches, branched off the develop branch, to work on features that will make the develop codebase unstable. master develop (Delete branch)
  • 19. mail-unstable Branch Workflows (cont.) Sometimes, however, you might need to do a hotfix, which bypasses the typical development cycle. This is used sparingly, and is typically reserved for security issues. master develop (Delete branch) (Delete branch)