SlideShare uma empresa Scribd logo
1 de 64
Baixar para ler offline
Question
Who uses revision
control?!
#TPR7!
DIY Revision
Control
•  Duplicate and rename
•  Track Changes / Save as Version
•  Recovering the last auto-save
“When you work within your
confines, when you realize
your limitations, that’s when
you can break through them.”!
Revision Control
Systems
•  Track changes to a set of files
•  Mostly text edits
•  Usually source code
Common Systems
•  Subversion (SVN)
•  BitKeeper
•  CVS, SVK, etc.
Compare Them All
http://en.wikipedia.org/wiki/
Comparison_of_revision_control_software
Why Choose Git?
•  Open Source (free)
•  Distributed gives you autonomy
•  Easy branching for experimenting
How Git Works
#TPR7!
The Δ
It’s Efficient
•  Revisions, not versions
•  Repo stores all changes
– 1st	
  change:	
  	
  git init!
•  Each change links to previous
The 3 Areas
•  Working Copy
•  Staging Index
•  Repo
Working
Copy
Staging
Index
Repo
“I was learning a
lot of things fast.”!
An Analogy
Packing a suitcase!
#TPR7!
Step 1:
All the Things!
•  Take some shirts out of the closet
•  Throw them on the bed
Working
Copy
Staging
Index
Repo
Step 2:
Just These Things
•  Choose a few shirts
•  Prepare them for packing
Working
Copy
Staging
Index
Repo
Step 3:
Pack the Things
•  Put the shirts in the suitcase
Working
Copy
Staging
Index
Repo
An Example
Packing pants!
Step 1
•  Take pants out of the closet
•  Touched the pants – that’s an edit
•  The pants are in your working copy
Working
Copy
Staging
Index
Repo
Step 2
•  Choose a few pants, fold them up
•  Selected a change – that’s an add
•  The pants are in your staging index
Working
Copy
Staging
Index
Repo
Step 3
•  Put the folded pants in your suitcase
•  Packed the pants – that’s a commit
•  The pants are in your repo
Working
Copy
Staging
Index
Repo
Another
Example
This time, with
commands!!
Step 1
•  Take socks out of the drawer
•  COMMAND: (none)
– Git	
  compares	
  current	
  files	
  to	
  repo
– Changes	
  go	
  in	
  working	
  copy	
  
automatically
Working
Copy
Staging
Index
Repo
Step 2
•  Pick a few socks, roll them up
•  COMMAND: git add
– Moves changes to staging index
– Works for edited files or new files
Working
Copy
Staging
Index
Repo
git
add
Step 3
•  Pack the socks in your suitcase
•  COMMAND: git commit
– Records the changes to your repo
– Can be a single change or many
Working
Copy
Staging
Index
Repo
git
commit
Step 4
•  Put unused clothes away
•  COMMAND: git checkout
– Erases changes from the working copy
– A good way to get out of a bad situation
Working
Copy
Working
Copy
git
checkout!
Commit
#1
Commit
#2
Commit
#3
“After all the weeks
of practice I felt
ready to play.”!
A Demo
With Terminal and
the GitHub app!
State of the
Repo
Sequential changes!
Commit
#1
Commit
#2
Commit
#3
HEAD
Branches
Want to try
something?!
Making Branches
git branch <name>!
!
•  Clones the repo
•  New working copy and staging index
•  Git Flow – a branching model
Switching Branches
git checkout <name>!
•  Quickly swap to a different branch
•  Changes what’s in your editor
•  Changes what’s in the browser
An Example
Going to Jamaica!
Rewind the Repo
git checkout <commit2>!
!
•  Set the HEAD to commit #2
Commit
#1
Commit
#2
Commit
#3
HEAD
Commit
#1
Commit
#2
Commit
#3
HEAD
Branch the Rewind
git checkout – b <branchName>!
•  Make a new branch off that commit
Master Jamaica
Working
Copy
Staging
Index
Repo
Get a Passport
•  A new item, not yet tracked
•  COMMAND: git add
– Skip the working copy
– Add directly to staging index
!
Working
Copy
Staging
Index
Repo
git add
Pack the Passport
•  Pack the passport
•  COMMAND: git commit
– Add to the repo
Working
Copy
Staging
Index
Repo
Merge the Changes
•  Add the change to the master
branch
•  COMMAND: git merge
– Merge all changes or cherry pick
Master Jamaica
Master Jamaica
Demo Time
Checkout prior commit,
branch, merge
GitHub.com
“Just do it like
it’s all you knew
how to do.”!
Learn More
•  http://try.github.io
•  “Git Essential Training”
by Kevin Skoglund on Lynda.com
•  http://git-scm.com/book
Clone This Rep
!
https://github.com/
brufftech/git-suitcase.git
Credits
•  Quotes from Get in the Van
by Henry Rollins
•  Designer:	
  Jacob	
  Melton	
  
	
  meltonjd@dukes.jmu.edu
•  Presenter:	
  Annette	
  Liskey	
  
	
  liskeyab@jmu.edu
Questions?

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (20)

Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 
Git from SVN
Git from SVNGit from SVN
Git from SVN
 
Git extension-training
Git extension-trainingGit extension-training
Git extension-training
 
Git basic
Git basicGit basic
Git basic
 
Version control with Git & GitHub
Version control with Git & GitHubVersion control with Git & GitHub
Version control with Git & GitHub
 
Git and GitHub crash course
Git and GitHub crash courseGit and GitHub crash course
Git and GitHub crash course
 
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 ...
 
Git presentation
Git presentationGit presentation
Git presentation
 
Git locally - part 1
Git locally - part 1Git locally - part 1
Git locally - part 1
 
Git,Github,How to host using Github
Git,Github,How to host using GithubGit,Github,How to host using Github
Git,Github,How to host using Github
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHub
 
git and github
git and githubgit and github
git and github
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagrams
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
 
Webinar : SVN to GIT Migration
Webinar : SVN to GIT Migration Webinar : SVN to GIT Migration
Webinar : SVN to GIT Migration
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
HacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubHacktoberFest-Git&GitHub
HacktoberFest-Git&GitHub
 
Version Control History and Git Basics
Version Control History and Git BasicsVersion Control History and Git Basics
Version Control History and Git Basics
 

Destaque

Exploiting classical bibliometrics of CSCW: classification, evaluation, limit...
Exploiting classical bibliometrics of CSCW: classification, evaluation, limit...Exploiting classical bibliometrics of CSCW: classification, evaluation, limit...
Exploiting classical bibliometrics of CSCW: classification, evaluation, limit...
António Correia
 
Di's innovationstur til usa i uge 14 2014
Di's innovationstur til usa i uge 14 2014Di's innovationstur til usa i uge 14 2014
Di's innovationstur til usa i uge 14 2014
DI - Dansk Industri
 
Memoria Observatorio 2011
Memoria Observatorio 2011Memoria Observatorio 2011
Memoria Observatorio 2011
bizikleteroak
 
Memoria Observatorio 2009
Memoria Observatorio 2009Memoria Observatorio 2009
Memoria Observatorio 2009
bizikleteroak
 
Slidepresentasi 120607231837-phpapp02
Slidepresentasi 120607231837-phpapp02Slidepresentasi 120607231837-phpapp02
Slidepresentasi 120607231837-phpapp02
Tiara Anggraini
 
PASTORCILLO MENTIROSO
PASTORCILLO MENTIROSOPASTORCILLO MENTIROSO
PASTORCILLO MENTIROSO
Dcmonsterford
 
Presentation1
Presentation1Presentation1
Presentation1
eforbet
 

Destaque (15)

Exploiting classical bibliometrics of CSCW: classification, evaluation, limit...
Exploiting classical bibliometrics of CSCW: classification, evaluation, limit...Exploiting classical bibliometrics of CSCW: classification, evaluation, limit...
Exploiting classical bibliometrics of CSCW: classification, evaluation, limit...
 
Di's innovationstur til usa i uge 14 2014
Di's innovationstur til usa i uge 14 2014Di's innovationstur til usa i uge 14 2014
Di's innovationstur til usa i uge 14 2014
 
Memoria Observatorio 2011
Memoria Observatorio 2011Memoria Observatorio 2011
Memoria Observatorio 2011
 
News of the week 8.10.13 abp ananda
News of the week 8.10.13   abp anandaNews of the week 8.10.13   abp ananda
News of the week 8.10.13 abp ananda
 
Memoria Observatorio 2009
Memoria Observatorio 2009Memoria Observatorio 2009
Memoria Observatorio 2009
 
Optimising the Emotional Connections Your Advertisements Create by Be On / AO...
Optimising the Emotional Connections Your Advertisements Create by Be On / AO...Optimising the Emotional Connections Your Advertisements Create by Be On / AO...
Optimising the Emotional Connections Your Advertisements Create by Be On / AO...
 
Slidepresentasi 120607231837-phpapp02
Slidepresentasi 120607231837-phpapp02Slidepresentasi 120607231837-phpapp02
Slidepresentasi 120607231837-phpapp02
 
PASTORCILLO MENTIROSO
PASTORCILLO MENTIROSOPASTORCILLO MENTIROSO
PASTORCILLO MENTIROSO
 
Aljabar
AljabarAljabar
Aljabar
 
International Customer Service Association Annual Conference 2013
International Customer Service Association Annual Conference 2013International Customer Service Association Annual Conference 2013
International Customer Service Association Annual Conference 2013
 
7 règles d’Or pour réussir un Projet CRM – Témoignage du LEM
7 règles d’Or pour réussir un Projet CRM – Témoignage du LEM7 règles d’Or pour réussir un Projet CRM – Témoignage du LEM
7 règles d’Or pour réussir un Projet CRM – Témoignage du LEM
 
Statistika deskriptif
 Statistika deskriptif Statistika deskriptif
Statistika deskriptif
 
Presentation+script example
Presentation+script examplePresentation+script example
Presentation+script example
 
Presentation1
Presentation1Presentation1
Presentation1
 
Таблетки для улучшения зрения «Тяньши»
Таблетки для улучшения зрения «Тяньши»Таблетки для улучшения зрения «Тяньши»
Таблетки для улучшения зрения «Тяньши»
 

Semelhante a Git in the Van HighEdWeb 2013

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
Robert Lee-Cann
 

Semelhante a Git in the Van HighEdWeb 2013 (20)

Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Source control management
Source control managementSource control management
Source control management
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Git Educated About Git - 20 Essential Commands
Git Educated About Git - 20 Essential CommandsGit Educated About Git - 20 Essential Commands
Git Educated About Git - 20 Essential Commands
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Intro to git
Intro to gitIntro to git
Intro to git
 
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
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 

Último

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
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
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...
 

Git in the Van HighEdWeb 2013