Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology Developer Forum 11/13/2012
Definition of DVCS "Talent borrows, genius steals." - Oscar Wilde "In computer programming, a distributed version control system (DVCS) keeps track of software revisions and allows many developers to work on a given project without necessarily being connected to a common network." - Wikipedia
Why use DVCS? Reduces the need for branching in large, distributed projects Allows use of version control when disconnected from network Allows users to version their own work before publishing to the remote repository Great for Open Source projects as it promotes using version control while still providing a way to control the centralized release version of your project
What's different in DVCS? All 'working copies' are actually repositories themselves, with all the same capabilities as the remote repository on the server (in this way, they behave much like a branch in traditional VCS) 'commit' operations are issued to the users local repository, resulting in a revision on their local repository Work is published to the remote repository through a "push" operation If revisions have been published to the server prior to the "push" operation, the user must do a "pull" operation to get these revisions and then merge these with their local changes This might sound like a lot of merging… and it is, but merge operations are much simpler in DVCS than they are in traditional VCS
Popular DVCS technologies Git (Linus Torvalds) Mercurial (hg) See also: Fossil, DCVS
Using DVCS (Hg) TortoiseHg Workbench demo Using multiple remote repositories Fixing mistakes: hg rollback vs. hg revert vs. hg backout "hg rollback" removes the most recent local revision. A rollback only works on revisions that have not been pushed to a remote server. "hg revert" undoes any pending uncommitted changes (essentially the same as svn revert). "hg backout" effectively "undoes" any revision. This shows up as a new local revision which then must be pushed to the remote server. "hg backout" operations can be issued against any revision (does not have to be the most recent)
Client Software TortoiseHg GitHub Atlassian SourceTree
Hosting GitHub Assembla JIRA
That’s it! Questions? Thanks for listening! Rob Gaston, web developer Farallon Geographics, Inc. PS: If you really want to be hip (and let’s face it, you do), use Sublime Text 2!