Version Control
            Systems
Understanding the differences between centralized and
decentralized version control sy...
Has this ever
           happened?
• You look in the trash for files.
• You have more than two or three levels of
  undo in...
What is Version
             Control

• Revision control (also known as version
  control, source control or (source) code...
What is Version
             Control

• Changes are usually identified by a number
  or letter code, termed the "revision
 ...
What is Version
             Control

• Each revision is associated with a
  timestamp and the person making the
  change....
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 ...
People Are Divided


•   "Merging is the key to software developer
    collaboration."




    Mark Shuttleworth (Ubuntu /...
People Are Divided


•   "By 2011-2012, I predict this technology will be
    widely adopted and many teams will wonder ho...
People Are Divided

• "Subversion has been
  the most pointless
  project ever started".
  "If you like using CVS,
  you s...
What else is there

• Mercurial (hg) and Bazaar (bzr) -
  decentralized. File Revision System not
  Delta Change Systems.
...
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 file://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 file
  > git rm file
  > git mv file
• > svn add file
  > svn rm file
  > svn mv file
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/ta...
GIT & SVN
Tagging and Branching

• > git tag -a name
• > svn copy http://example.com/svn/trunk
  http://example.com/svn/ta...
GIT & SVN
Tagging and Branching
• > git tag -l
  > git show tag
• > svn list http://example.com/svn/tags/
  > svn log --li...
GIT & SVN
Tagging and Branching
• > git branch branch
  > git checkout branch
• > svn copy http://example.com/svn/trunk
  ...
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
Version Control Lassosoft 2009 Lasso Developers Conference
Upcoming SlideShare
Loading in …5
×

Version Control Lassosoft 2009 Lasso Developers Conference

1,936 views

Published on

Lasso Developer Conference 2009, Lasso Developers Conference

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,936
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
24
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Version Control Lassosoft 2009 Lasso Developers Conference

  1. 1. Version Control Systems Understanding the differences between centralized and decentralized version control systems and the options of different types of VCS available
  2. 2. Has this ever happened? • You look in the trash for files. • You have more than two or three levels of undo in a document. • You have emailed someone to send you a copy of some files. • FTP has died mid transfer leaving partial files.
  3. 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 files.* *http://en.wikipedia.org/wiki/Revision_control
  4. 4. What is Version Control • Changes are usually identified by a number or letter code, termed the "revision number", "revision level", or simply "revision". *http://en.wikipedia.org/wiki/Revision_control
  5. 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 files, merged. *http://en.wikipedia.org/wiki/Revision_control
  6. 6. Types of Version Control • Centralized • CVS, Subversion, Perforce etc. • Distributed • GIT, Mercurial, Bazaar
  7. 7. Centralized • Needs to be online or LAN to repo.
  8. 8. Distributed • Do not need to be online. No central Repo.
  9. 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. 10. People Are Divided • "Merging is the key to software developer collaboration." Mark Shuttleworth (Ubuntu / Canonical Ltd.):
  11. 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. 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. 13. What else is there • Mercurial (hg) and Bazaar (bzr) - decentralized. File Revision System not Delta Change Systems. • CVS (dead), Perforce (ask kyle and fletcher)
  14. 14. GIT & SVN Copy a Project • > git clone url > git pull • > svn checkout url > svn update
  15. 15. GIT & SVN Create a Repository • > git init • > create repo
  16. 16. GIT & SVN Add to First Repo • > git add . > git commit • > svn import file://repo
  17. 17. GIT & SVN Check Differences • > git diff • > svn diff | less
  18. 18. GIT & SVN Check Status • > git status • > svn status
  19. 19. GIT & SVN Restore from Revision • > git checkout path • > svn revert path
  20. 20. GIT & SVN Moves and Changes • > git add file > git rm file > git mv file • > svn add file > svn rm file > svn mv file
  21. 21. GIT & SVN Committing • > git commit -a • > svn commit
  22. 22. GIT & SVN Reviewing History • > git commit -a • > svn commit
  23. 23. GIT & SVN Tagging and Branching • > git tag -a name • > svn copy http://example.com/svn/trunk http://example.com/svn/tags/name
  24. 24. GIT & SVN Tagging and Branching • > git tag -a name • > svn copy http://example.com/svn/trunk http://example.com/svn/tags/name
  25. 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. 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. 27. GIT & SVN Changing Branches • > git merge branch • > svn merge -r 20:HEAD http:// example.com/svn/branches/branch
  28. 28. GIT & SVN Remote Branches • > git clone url • > svn checkout url
  29. 29. GIT & SVN Remote Branches • > git checkout --track -b branch origin/ branch • > svn switch url
  30. 30. GIT & SVN Cherry Picking • > git cherry-pick rev • > svn merge -c rev url
  31. 31. Git GUI • gitc • git-gui • git cola • gitx
  32. 32. More Information • http://www.infoq.com/articles/dvcs-guide • http://git.or.cz/course/svn.html

×