Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer...

9
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

Transcript of Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer...

Page 1: Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology.

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

Page 2: Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology.

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

Page 3: Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology.

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

Page 4: Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology.

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

Page 5: Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology.

Popular DVCS technologies

• Git (Linus Torvalds) http://git-scm.com/

• Mercurial (hg) http://mercurial.selenic.com/

• See also: Fossil, DCVS

Page 6: Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology.

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)

Page 7: Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology.

Client Software

• TortoiseHg• http://tortoisehg.bitbucket.org/

• GitHub• http://windows.github.com/• http://mac.github.com/

• Atlassian SourceTree• http://www.sourcetreeapp.com/

Page 8: Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology.

Hosting

• GitHub• https://github.com/

• Assembla• https://www.assembla.com/

• JIRA

Page 9: Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology.

That’s it!

• Questions?• Thanks for listening!

Rob Gaston, web developer

Farallon Geographics, Inc.

[email protected]

http://www.fargeo.com/

PS: If you really want to be hip (and let’s face it, you do), use Sublime Text 2! http://www.sublimetext.com/