Intro to Distributed Version Control

Click here to load reader

  • date post

    17-May-2015
  • Category

    Technology

  • view

    1.027
  • download

    3

Embed Size (px)

description

I gave this talk at work about distributed version control. There is some background on version control, and centralized version control.

Transcript of Intro to Distributed Version Control

  • 1. DVC Distributed Version ControlTech Talk Presented @ CDL 02/24/2010 by Stephanie Collett Friday, February 26, 2010This talk is about distributed version control, with some background on version control, and centralized version control.

2. VC Version Control Friday, February 26, 2010There are several names for the basic idea of software version control. 3. RCRevision Control Friday, February 26, 2010Some call it revision control. 4. SCM Source Code Management Friday, February 26, 2010Source Code Management is another one. 5. SC Source Control Friday, February 26, 2010One I use now and then is Source Control. Though sometimes there is nuanced, often these four are all used synonymously. 6. CVC CRC Centralized CSCM CSCFriday, February 26, 2010Sometimes there are prexed with Centralized, referring to the technical architecture of the implementation. 7. DVC DRC Distributed DSCM DSCFriday, February 26, 2010Distributed refers to the architecture too. But it is all just a type of it is version control. 8. VCSCVCS DVCSRCSCRCS DRCS System SCMS CSCMS DSCMSSCSCSCSDSCS Friday, February 26, 2010Systems is often suffixed to refer to the technical implementations of version control. 9. http://www.ickr.com/photos/lotterymonkey/115959194/ Friday, February 26, 2010Though some are more common then others, you might see 12 acronyms that mean software version control of one type or another. 10. Version ControlFriday, February 26, 2010Though this is about software version control, the idea is not unique to software. 11. Documents/ Friday, February 26, 2010Often when people have a monumental change to a document, they save the current one with some suffix like old to make sure they can go back if needed. That breaks down fast, but there are other naming conventions used to get around that. If you start collaborating you might have person-specic versions of versions. 12. Documents/business_letter.doc Friday, February 26, 2010Often when people have a monumental change to a document, they save the current one with some suffix like old to make sure they can go back if needed. That breaks down fast, but there are other naming conventions used to get around that. If you start collaborating you might have person-specic versions of versions. 13. Documents/business_letter.doc business_letter_old.doc Friday, February 26, 2010Often when people have a monumental change to a document, they save the current one with some suffix like old to make sure they can go back if needed. That breaks down fast, but there are other naming conventions used to get around that. If you start collaborating you might have person-specic versions of versions. 14. Documents/business_letter.doc business_letter_old.doc business_letter_02_24_2010.doc Friday, February 26, 2010Often when people have a monumental change to a document, they save the current one with some suffix like old to make sure they can go back if needed. That breaks down fast, but there are other naming conventions used to get around that. If you start collaborating you might have person-specic versions of versions. 15. Documents/business_letter.doc business_letter_old.doc business_letter_02_24_2010.doc business_letter_v1.doc Friday, February 26, 2010Often when people have a monumental change to a document, they save the current one with some suffix like old to make sure they can go back if needed. That breaks down fast, but there are other naming conventions used to get around that. If you start collaborating you might have person-specic versions of versions. 16. Documents/business_letter.doc business_letter_old.doc business_letter_02_24_2010.doc business_letter_v1.doc business_letter_v1_cdf.doc Friday, February 26, 2010Often when people have a monumental change to a document, they save the current one with some suffix like old to make sure they can go back if needed. That breaks down fast, but there are other naming conventions used to get around that. If you start collaborating you might have person-specic versions of versions. 17. http://www.ickr.com/photos/wokka/2836512221/ Friday, February 26, 2010This can get cluttered very fast. 18. http://www.ickr.com/photos/pio1976/3330670980/sizes/l/ Friday, February 26, 2010Version control organizes all of those versions, making it easier to work. 19. for documents there is track changes Friday, February 26, 2010 20. for source code there is version control repositories Friday, February 26, 2010 21. Friday, February 26, 2010This is an example of a simple Hello World program in a version control workow. First, create a repository (it can be local or on a server some where). Second, begin committing changes to it. 22. (Working) Directory Friday, February 26, 2010This is an example of a simple Hello World program in a version control workow. First, create a repository (it can be local or on a server some where). Second, begin committing changes to it. 23. (Working) Directory Repository Friday, February 26, 2010This is an example of a simple Hello World program in a version control workow. First, create a repository (it can be local or on a server some where). Second, begin committing changes to it. 24. (Working) Directory Repository A Initial Commit Friday, February 26, 2010This is an example of a simple Hello World program in a version control workow. First, create a repository (it can be local or on a server some where). Second, begin committing changes to it. 25. Working Directory Repository A Friday, February 26, 2010 26. Working Directory Repository A Friday, February 26, 2010 27. Working Directory Repository ABAnother Commit Friday, February 26, 2010 28. Working Directory Repository AB Friday, February 26, 2010 29. Working Directory Repository AB Friday, February 26, 2010 30. Working Directory Repository ABCThird Commit Friday, February 26, 2010 31. Repository A Add | Modify | Delete Friday, February 26, 2010Software usually requires multiple dependent les, so version control can handle multiple les per commit. 32. Repository AB Add | Modify | Delete Friday, February 26, 2010Software usually requires multiple dependent les, so version control can handle multiple les per commit. 33. Repository ABCAdd | Modify | Delete Friday, February 26, 2010Software usually requires multiple dependent les, so version control can handle multiple les per commit. 34. http://www.ickr.com/photos/tanaka/2345575389/sizes/l/ Friday, February 26, 2010It is helpful to think of these commits as snapshots. Although, often version control repositories internally only store changes by commits or employ other ways to reduce size. 35. RepositoryA B C Friday, February 26, 2010However, no matter how they internally store the changes, checking out a version will give you a snapshot of the code at the time of the commit. 36. RepositoryCheckout BA B C Friday, February 26, 2010However, no matter how they internally store the changes, checking out a version will give you a snapshot of the code at the time of the commit. 37. RepositoryCheckout BA B C Checkout C Friday, February 26, 2010However, no matter how they internally store the changes, checking out a version will give you a snapshot of the code at the time of the commit. 38. Why Version Control?Friday, February 26, 2010There are many reasons why version control is helpful for development. 39. RollbackFriday, February 26, 2010Being able to rollback to a previous version is the most useful thing about VC. 40. http://www.ickr.com/photos/johnjoh/448665548/ Friday, February 26, 2010Make a mistake, no problem. Just rollback to the last version. Make a mistake 11 commits ago. No problem there either. (for supercharged rollback, check out bisecting in Git or Mercurial.) 41. DevelopmentFriday, February 26, 2010VC helps support the development workow as well. 42. Respository Friday, February 26, 2010Lets start with a simple repository. 43. Trunk http://www.ickr.com/photos/chanc/3178816533/sizes/o/ Friday, February 26, 2010The main line of code is often called the trunk. Sometimes you might not want to pollute your trunk with a really experimental feature you might never release. So you can branch. If you are successful, the branch can be merged later. 44. Trunk http://www.ickr.com/photos/chanc/3178816533/sizes/o/ Friday, February 26, 2010The main line of code is often called the trunk. Sometimes you might not want to pollute your trunk with a really experimental feature you might never release. So you can branch. If you are successful, the branch can be merged later. 45. Trunk http://www.ickr.com/photos/chanc/3178816533/sizes/o/ Friday, February 26, 2010The main line of code is often called the trunk. Sometimes you might not want to pollute your trunk with a really experimental feature you might never release. So you can branch. If you are successful, the branch can be merged later. 46. TrunkBranch http://www.ickr.com/photos/chanc/3178816533/sizes/o/ Friday, February 26, 2010The main line of code is often called the trunk. Sometimes you might not want to pollute your trunk with a really experimental feature you might never release. So you can branch. If you are successful, the branch can be merged later. 47. TrunkBranch http://www.ickr.com/photos/chanc/3178816533/sizes/o/ Friday, February 26, 2010The main line of code is often called the trunk. Sometimes you might not want to pollute your trunk with a really experimental feature you might never release. So you can branch. If you are successful, the branch can be merged later. 48. TrunkBranch http://www.ickr.com/photos/chanc/3178816533/sizes/o/ Friday, February 26, 2010The main line of code is often called the trunk. Sometimes you might not want to pollute your trunk with a really experimental feature you might never release. So you can branch. If you are successful, the branch can be me