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

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.pdfsudhanshuwaghmare1
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜RTylerCroy
Ā 
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 2024The Digital Insurer
Ā 
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
Ā 
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
Ā 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
Ā 
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 2024SynarionITSolutions
Ā 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
Ā 
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 AutomationSafe Software
Ā 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
Ā 
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
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
Ā 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
Ā 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
Ā 
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 2024The Digital Insurer
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
Ā 
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
Ā 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
Ā 

Recently uploaded (20)

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
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
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
Ā 
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
Ā 
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
Ā 
+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...
Ā 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Ā 
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
Ā 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
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 Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Ā 
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, ...
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Ā 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Ā 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Ā 
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
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Ā 
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
Ā 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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