Getting Started With Subversion
Upcoming SlideShare
Loading in...5
×
 

Getting Started With Subversion

on

  • 7,358 views

My talk at BarCamp Blackpool on Subversion.

My talk at BarCamp Blackpool on Subversion.

Statistics

Views

Total Views
7,358
Slideshare-icon Views on SlideShare
7,287
Embed Views
71

Actions

Likes
5
Downloads
231
Comments
0

4 Embeds 71

http://www.jordanh.net 53
http://www.slideshare.net 11
http://archive.jordanh.net 5
http://172.132.45.200 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Getting Started With Subversion Getting Started With Subversion Presentation Transcript

    • Getting started with Subversion
      Jordan Hatch
    • What is subversion?
      Version control system
      Open Source
      Easy to set up
    • Why Version Control?
    • Keep Project organised
      File and project history
      Works with any text-based files
      More than one person editing
      Easy to branch/merge projects
      Small footprint on server
    • A Backup System
      Rollback changes on files
      Find out who changed what!
    • Setting Up Subversion
    • Choose the server…
      svnserve
      Easy to set up
      Can be used with SSH
      Apache HTTP Server
      Harder to set up
      HTML repository browsing
      Multiple authentication methods
    • svnserve
      Available for multiple platforms
      Windows: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup-svnserve.html
      Mac: http://developer.apple.com/mac/library/documentation/Darwin/ Reference/ManPages/man8/svnserve.8.html
      Linux Package Manager
    • Creating a repository
      Linux & Mac OS X:
      $ svnadmin create /home/jordan/repo
      Windows:
      svnadmin create C:Repo
    • Choose A Client…
      Command Line!
      “Out of the box” SVN support on Mac OS X
      Easy to install on Linux
      Binaries for Windows – http://subversion.tigris.org/
      GUIs
      Tortoise SVN – Windows only
      IDE Plugins
      Versions App for Mac
    • SVN Basics
    • Repository layout
      No forced structure
      Most commonly-used way…
    • REPOSITORY LAYOUT
      trunk – Main project development
      branches – Experimental and release branches
      tags – “Snapshot” of a project
    • Importing Your Project
      $ svn import myproject /path/to/repo
      -m “Importing my project”
      Adding myproject/page.php
      Adding myproject/style.css
      Adding myproject/includes
      Adding myproject/includes/db.php
      Committed revision 1.
    • Checking out Project
      $ svn checkout /path/to/repo/project
      A myproject/page.php
      A myproject/style.css
      A myproject/includes
      A myproject/includes/db.php
      Checked out revision 1.
    • Committing changes
      $ svn status
      A myproject/login.php
      A myproject/logout.php
      M myproject/page.php
      M myproject/style.css
      M myproject/includes/db.php
    • Committing Changes
      $ svn commit -m “Added login page.”
      Sending myproject/login.php
      Sending myproject/logout.php
      Sending myproject/page.php
      Sending myproject/style.css
      Sending myproject/includes/db.php
      Transmitting file data .
      Committed revision 3.
    • Resolving Conflicts
      $ svn status
      C myproject/login.php
    • Resolving Conflicts
      Four ways of resolving conflicts:
      Overwrite with your version of the file
      Overwrite with the existing version
      Merge the changes manually
      Merge using a merge tool
    • RESOLVING CONFLICTS
      $ svn resolve --accept working myproject/login.php
      Resolved conflicted state of ‘myproject/login.php'
      $ svn commit -m “Added login session check.”
      Sending myproject/login.php
      Transmitting file data .
      Committed revision 6.
    • Creating Branches & Tags
      It’s just a copy of a folder…
      Merge changes back into trunk later
      $ svn copy /project/trunk /project/branches/1.0
      $ svn copy /project/trunk /project/tags/1.0
      $ svn copy /project/branches/1.0 /project/tags/1.1
    • SVN Examples
    • Release branches
      Used often in open source projects
      Very flexible
      Allows for maintenance releases while core is worked on for next major release.
    • Release Branches
      tags
      1.0
      1.0.1
      1.5
      1.5.1
      1.7
      branches
      1.7
      1.5
      1.0
      trunk
    • Seen in the wild…
      WordPress’ SVN
      Zend Framework SVN
    • Branching Concepts
      Feature Branches
      Allows for experimentation
      Vendor Branches
      Keeping track of code libraries
      Allows for modifications to suit your needs
    • Conclusion
      You need version control!
      SVN is open-source and (fairly) easy to set up…
      Use branches and tags to experiment with your code.
      Organise it however you like.
    • And IF You Get Stuck…
      http://svnbook.red-bean.com
      Everything you need to know about SVN.
    • Thanks (:
      Jordan Hatch - @1jh
      http://www.jordanh.net/