SlideShare a Scribd company logo
1 of 33
Version Control
            Systems
Understanding the differences between centralized and
decentralized version control systems and the options
           of different types of VCS available
Has this ever
           happened?
ā€¢ You look in the trash for ļ¬les.
ā€¢ You have more than two or three levels of
  undo in a document.
ā€¢ You have emailed someone to send you a
  copy of some ļ¬les.
ā€¢ FTP has died mid transfer leaving partial
  ļ¬les.
What is Version
             Control

ā€¢ Revision control (also known as version
  control, source control or (source) code
  management (SCM)) is the management of
  changes to documents, programs, and other
  information stored as computer ļ¬les.*



  *http://en.wikipedia.org/wiki/Revision_control
What is Version
             Control

ā€¢ Changes are usually identiļ¬ed by a number
  or letter code, termed the "revision
  number", "revision level", or simply
  "revision".



  *http://en.wikipedia.org/wiki/Revision_control
What is Version
             Control

ā€¢ Each revision is associated with a
  timestamp and the person making the
  change. Revisions can be compared,
  restored, and with some types of ļ¬les,
  merged.



  *http://en.wikipedia.org/wiki/Revision_control
Types of Version
         Control
ā€¢ Centralized
 ā€¢ CVS, Subversion, Perforce etc.
ā€¢ Distributed
 ā€¢ GIT, Mercurial, Bazaar
Centralized


ā€¢   Needs to be online or
    LAN to repo.
Distributed


ā€¢   Do not need to be
    online. No central
    Repo.
People Are Divided

ā€¢   ā€œHey, you can use your old model if you want to. git
    doesn't *force* you to change. But trust me, once
    you start noticing how different groups can have
    their own experimental branches, and can ask
    people to test stuff that isn't ready for mainline yet,
    you'll see what the big deal is all about.ā€

    Centralized _works_. It's just *inferior*.


    Linus Torvalds in a letter to the KDE team 20 Aug 2007
People Are Divided


ā€¢   "Merging is the key to software developer
    collaboration."




    Mark Shuttleworth (Ubuntu / Canonical Ltd.):
People Are Divided


ā€¢   "By 2011-2012, I predict this technology will be
    widely adopted and many teams will wonder how
    they once managed without it."




    Ian Clatworthy (Canonical / Bazaar)
People Are Divided

ā€¢ "Subversion has been
  the most pointless
  project ever started".
  "If you like using CVS,
  you should be in some
  kind of mental
  institution or
  somewhere else".


   Linus Torvalds
What else is there

ā€¢ Mercurial (hg) and Bazaar (bzr) -
  decentralized. File Revision System not
  Delta Change Systems.
ā€¢ CVS (dead), Perforce (ask kyle and ļ¬‚etcher)
GIT & SVN
       Copy a Project

ā€¢ > git clone url
  > git pull
ā€¢ > svnĀ checkoutĀ url
  > svn update
GIT & SVN
 Create a Repository

ā€¢ > git init
ā€¢ > create repo
GIT & SVN
    Add to First Repo

ā€¢ > git add .
  > git commit
ā€¢ > svn import ļ¬le://repo
GIT & SVN
    Check Differences

ā€¢ > git diff
ā€¢ > svn diff | less
GIT & SVN
         Check Status

ā€¢ > git status
ā€¢ > svn status
GIT & SVN
Restore from Revision

ā€¢ > git checkout path
ā€¢ > svn revert path
GIT & SVN
  Moves and Changes
ā€¢ > git add ļ¬le
  > git rm ļ¬le
  > git mv ļ¬le
ā€¢ > svn add ļ¬le
  > svn rm ļ¬le
  > svn mv ļ¬le
GIT & SVN
         Committing

ā€¢ > git commit -a
ā€¢ > svn commit
GIT & SVN
   Reviewing History

ā€¢ > git commit -a
ā€¢ > svn commit
GIT & SVN
Tagging and Branching

ā€¢ > git tag -a name
ā€¢ > svn copy http://example.com/svn/trunk
  http://example.com/svn/tags/name
GIT & SVN
Tagging and Branching

ā€¢ > git tag -a name
ā€¢ > svn copy http://example.com/svn/trunk
  http://example.com/svn/tags/name
GIT & SVN
Tagging and Branching
ā€¢ > git tag -l
  > git show tag
ā€¢ > svnĀ listĀ http://example.com/svn/tags/
  > svnĀ log --limitĀ 1Ā http://example.com/svn/
  tags/tag
GIT & SVN
Tagging and Branching
ā€¢ > git branch branch
  > gitĀ checkoutĀ branch
ā€¢ > svn copy http://example.com/svn/trunk
  http://example.com/svn/branches/branch
  > svn switch http://example.com/svn/
  branches/branch
GIT & SVN
   Changing Branches

ā€¢ > git merge branch
ā€¢ > svn merge -r 20:HEAD http://
  example.com/svn/branches/branch
GIT & SVN
    Remote Branches

ā€¢ > git clone url
ā€¢ > svnĀ checkoutĀ url
GIT & SVN
    Remote Branches

ā€¢ > git checkout --track -b branch origin/
  branch
ā€¢ > svnĀ switchĀ url
GIT & SVN
       Cherry Picking

ā€¢ > git cherry-pick rev
ā€¢ > svn merge -c rev url
Git GUI

ā€¢ gitc
ā€¢ git-gui
ā€¢ git cola
ā€¢ gitx
More Information


ā€¢ http://www.infoq.com/articles/dvcs-guide
ā€¢ http://git.or.cz/course/svn.html

More Related Content

What's hot

Version Control & Git
Version Control & GitVersion Control & Git
Version Control & GitCraig Smith
Ā 
From svn to git
From svn to gitFrom svn to git
From svn to gitNehal Shah
Ā 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with GitThings Lab
Ā 
Subversion to Git Migration
Subversion to Git MigrationSubversion to Git Migration
Subversion to Git MigrationTim Massey
Ā 
Git learn from scratch
Git learn from scratchGit learn from scratch
Git learn from scratchMir Arif Hasan
Ā 
What is version control software and why do you need it?
What is version control software and why do you need it?What is version control software and why do you need it?
What is version control software and why do you need it?Leonid Mamchenkov
Ā 
Git basics
Git basicsGit basics
Git basicsAshwin Date
Ā 
Using Subversion and Git Together
Using Subversion and Git TogetherUsing Subversion and Git Together
Using Subversion and Git Togethertmatesoftware
Ā 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
Ā 

What's hot (17)

Subversion
SubversionSubversion
Subversion
Ā 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
Ā 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
Ā 
From svn to git
From svn to gitFrom svn to git
From svn to git
Ā 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
Ā 
Subversion to Git Migration
Subversion to Git MigrationSubversion to Git Migration
Subversion to Git Migration
Ā 
Git vs svn
Git vs svnGit vs svn
Git vs svn
Ā 
Git learn from scratch
Git learn from scratchGit learn from scratch
Git learn from scratch
Ā 
What is version control software and why do you need it?
What is version control software and why do you need it?What is version control software and why do you need it?
What is version control software and why do you need it?
Ā 
Git basics
Git basicsGit basics
Git basics
Ā 
Git
GitGit
Git
Ā 
Git
GitGit
Git
Ā 
Git hub
Git hubGit hub
Git hub
Ā 
Git basics
Git basicsGit basics
Git basics
Ā 
Using Subversion and Git Together
Using Subversion and Git TogetherUsing Subversion and Git Together
Using Subversion and Git Together
Ā 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Ā 
Git Tech Talk
Git  Tech TalkGit  Tech Talk
Git Tech Talk
Ā 

Similar to Version Control Lassosoft 2009 Lasso Developers Conference

Introduction to git
Introduction to gitIntroduction to git
Introduction to gitNguyen Van Hung
Ā 
Intro to git
Intro to gitIntro to git
Intro to gitjosh_cutler
Ā 
Slide set 7 (Source Code Management History Overview) - Copy.pptx
Slide set 7 (Source Code Management History  Overview) - Copy.pptxSlide set 7 (Source Code Management History  Overview) - Copy.pptx
Slide set 7 (Source Code Management History Overview) - Copy.pptxUTKARSHBHARDWAJ71
Ā 
Luis atencio on_git
Luis atencio on_gitLuis atencio on_git
Luis atencio on_gitLuis Atencio
Ā 
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 GitGeoff Hoffman
Ā 
An introduction to Git and GitFlow
An introduction to Git and GitFlowAn introduction to Git and GitFlow
An introduction to Git and GitFlowMark Everard
Ā 
Version Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part IVersion Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part ISergey Aganezov
Ā 
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 GitHubKim Moir
Ā 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Gitatishgoswami
Ā 
Git 101
Git 101Git 101
Git 101jayrparro
Ā 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
Ā 
GIT In Detail
GIT In DetailGIT In Detail
GIT In DetailHaitham Raik
Ā 
Source-it Version-contol & GIT - floating-lesson
Source-it Version-contol & GIT - floating-lessonSource-it Version-contol & GIT - floating-lesson
Source-it Version-contol & GIT - floating-lessonYoram Michaeli
Ā 
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)Ahmed El-Arabawy
Ā 
Working with Git
Working with GitWorking with Git
Working with GitTony Hillerson
Ā 
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 CommandsJeremy Lindblom
Ā 

Similar to Version Control Lassosoft 2009 Lasso Developers Conference (20)

Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Ā 
GIT INTRODUCTION
GIT INTRODUCTIONGIT INTRODUCTION
GIT INTRODUCTION
Ā 
Intro to git
Intro to gitIntro to git
Intro to git
Ā 
Git
GitGit
Git
Ā 
Slide set 7 (Source Code Management History Overview) - Copy.pptx
Slide set 7 (Source Code Management History  Overview) - Copy.pptxSlide set 7 (Source Code Management History  Overview) - Copy.pptx
Slide set 7 (Source Code Management History Overview) - Copy.pptx
Ā 
Luis atencio on_git
Luis atencio on_gitLuis atencio on_git
Luis atencio on_git
Ā 
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
Ā 
An introduction to Git and GitFlow
An introduction to Git and GitFlowAn introduction to Git and GitFlow
An introduction to Git and GitFlow
Ā 
Version Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part IVersion Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part I
Ā 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Ā 
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
Ā 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Ā 
Git 101
Git 101Git 101
Git 101
Ā 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
Ā 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
Ā 
Source-it Version-contol & GIT - floating-lesson
Source-it Version-contol & GIT - floating-lessonSource-it Version-contol & GIT - floating-lesson
Source-it Version-contol & GIT - floating-lesson
Ā 
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)
Ā 
Working with Git
Working with GitWorking with Git
Working with Git
Ā 
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
Ā 

Recently uploaded

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
Ā 
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
Ā 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
Ā 
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
Ā 
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
Ā 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
Ā 
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
Ā 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
Ā 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
Ā 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
Ā 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
Ā 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
Ā 
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
Ā 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
Ā 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
Ā 
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
Ā 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
Ā 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
Ā 
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
Ā 

Recently uploaded (20)

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
Ā 
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
Ā 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
Ā 
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
Ā 
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
Ā 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
Ā 
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
Ā 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Ā 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Ā 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
Ā 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
Ā 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Ā 
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
Ā 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Ā 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Ā 
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...
Ā 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Ā 
+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...
Ā 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
Ā 
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
Ā 

Version Control Lassosoft 2009 Lasso Developers Conference

  • 1. Version Control Systems Understanding the differences between centralized and decentralized version control systems and the options of different types of VCS available
  • 2. Has this ever happened? ā€¢ You look in the trash for ļ¬les. ā€¢ You have more than two or three levels of undo in a document. ā€¢ You have emailed someone to send you a copy of some ļ¬les. ā€¢ FTP has died mid transfer leaving partial ļ¬les.
  • 3. What is Version Control ā€¢ Revision control (also known as version control, source control or (source) code management (SCM)) is the management of changes to documents, programs, and other information stored as computer ļ¬les.* *http://en.wikipedia.org/wiki/Revision_control
  • 4. What is Version Control ā€¢ Changes are usually identiļ¬ed by a number or letter code, termed the "revision number", "revision level", or simply "revision". *http://en.wikipedia.org/wiki/Revision_control
  • 5. What is Version Control ā€¢ Each revision is associated with a timestamp and the person making the change. Revisions can be compared, restored, and with some types of ļ¬les, merged. *http://en.wikipedia.org/wiki/Revision_control
  • 6. Types of Version Control ā€¢ Centralized ā€¢ CVS, Subversion, Perforce etc. ā€¢ Distributed ā€¢ GIT, Mercurial, Bazaar
  • 7. Centralized ā€¢ Needs to be online or LAN to repo.
  • 8. Distributed ā€¢ Do not need to be online. No central Repo.
  • 9. People Are Divided ā€¢ ā€œHey, you can use your old model if you want to. git doesn't *force* you to change. But trust me, once you start noticing how different groups can have their own experimental branches, and can ask people to test stuff that isn't ready for mainline yet, you'll see what the big deal is all about.ā€ Centralized _works_. It's just *inferior*. Linus Torvalds in a letter to the KDE team 20 Aug 2007
  • 10. People Are Divided ā€¢ "Merging is the key to software developer collaboration." Mark Shuttleworth (Ubuntu / Canonical Ltd.):
  • 11. People Are Divided ā€¢ "By 2011-2012, I predict this technology will be widely adopted and many teams will wonder how they once managed without it." Ian Clatworthy (Canonical / Bazaar)
  • 12. People Are Divided ā€¢ "Subversion has been the most pointless project ever started". "If you like using CVS, you should be in some kind of mental institution or somewhere else". Linus Torvalds
  • 13. What else is there ā€¢ Mercurial (hg) and Bazaar (bzr) - decentralized. File Revision System not Delta Change Systems. ā€¢ CVS (dead), Perforce (ask kyle and ļ¬‚etcher)
  • 14. GIT & SVN Copy a Project ā€¢ > git clone url > git pull ā€¢ > svnĀ checkoutĀ url > svn update
  • 15. GIT & SVN Create a Repository ā€¢ > git init ā€¢ > create repo
  • 16. GIT & SVN Add to First Repo ā€¢ > git add . > git commit ā€¢ > svn import ļ¬le://repo
  • 17. GIT & SVN Check Differences ā€¢ > git diff ā€¢ > svn diff | less
  • 18. GIT & SVN Check Status ā€¢ > git status ā€¢ > svn status
  • 19. GIT & SVN Restore from Revision ā€¢ > git checkout path ā€¢ > svn revert path
  • 20. GIT & SVN Moves and Changes ā€¢ > git add ļ¬le > git rm ļ¬le > git mv ļ¬le ā€¢ > svn add ļ¬le > svn rm ļ¬le > svn mv ļ¬le
  • 21. GIT & SVN Committing ā€¢ > git commit -a ā€¢ > svn commit
  • 22. GIT & SVN Reviewing History ā€¢ > git commit -a ā€¢ > svn commit
  • 23. GIT & SVN Tagging and Branching ā€¢ > git tag -a name ā€¢ > svn copy http://example.com/svn/trunk http://example.com/svn/tags/name
  • 24. GIT & SVN Tagging and Branching ā€¢ > git tag -a name ā€¢ > svn copy http://example.com/svn/trunk http://example.com/svn/tags/name
  • 25. GIT & SVN Tagging and Branching ā€¢ > git tag -l > git show tag ā€¢ > svnĀ listĀ http://example.com/svn/tags/ > svnĀ log --limitĀ 1Ā http://example.com/svn/ tags/tag
  • 26. GIT & SVN Tagging and Branching ā€¢ > git branch branch > gitĀ checkoutĀ branch ā€¢ > svn copy http://example.com/svn/trunk http://example.com/svn/branches/branch > svn switch http://example.com/svn/ branches/branch
  • 27. GIT & SVN Changing Branches ā€¢ > git merge branch ā€¢ > svn merge -r 20:HEAD http:// example.com/svn/branches/branch
  • 28. GIT & SVN Remote Branches ā€¢ > git clone url ā€¢ > svnĀ checkoutĀ url
  • 29. GIT & SVN Remote Branches ā€¢ > git checkout --track -b branch origin/ branch ā€¢ > svnĀ switchĀ url
  • 30. GIT & SVN Cherry Picking ā€¢ > git cherry-pick rev ā€¢ > svn merge -c rev url
  • 31.
  • 32. Git GUI ā€¢ gitc ā€¢ git-gui ā€¢ git cola ā€¢ gitx