Your SlideShare is downloading. ×
  • Like
Getting Started With Subversion
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Getting Started With Subversion

  • 6,473 views
Published

My talk at BarCamp Blackpool on Subversion.

My talk at BarCamp Blackpool on Subversion.

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
6,473
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
235
Comments
0
Likes
5

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Getting started with Subversion
    Jordan Hatch
  • 2. What is subversion?
    Version control system
    Open Source
    Easy to set up
  • 3. Why Version Control?
  • 4. 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
  • 5. A Backup System
    Rollback changes on files
    Find out who changed what!
  • 6. Setting Up Subversion
  • 7. 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
  • 8. 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
  • 9. Creating a repository
    Linux & Mac OS X:
    $ svnadmin create /home/jordan/repo
    Windows:
    svnadmin create C:Repo
  • 10. 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
  • 11. SVN Basics
  • 12. Repository layout
    No forced structure
    Most commonly-used way…
  • 13.
  • 14. REPOSITORY LAYOUT
    trunk – Main project development
    branches – Experimental and release branches
    tags – “Snapshot” of a project
  • 15. 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.
  • 16. 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.
  • 17. 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
  • 18. 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.
  • 19. Resolving Conflicts
    $ svn status
    C myproject/login.php
  • 20. 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
  • 21. 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.
  • 22. 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
  • 23. SVN Examples
  • 24. Release branches
    Used often in open source projects
    Very flexible
    Allows for maintenance releases while core is worked on for next major release.
  • 25. Release Branches
    tags
    1.0
    1.0.1
    1.5
    1.5.1
    1.7
    branches
    1.7
    1.5
    1.0
    trunk
  • 26. Seen in the wild…
    WordPress’ SVN
    Zend Framework SVN
  • 27. Branching Concepts
    Feature Branches
    Allows for experimentation
    Vendor Branches
    Keeping track of code libraries
    Allows for modifications to suit your needs
  • 28. 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.
  • 29. And IF You Get Stuck…
    http://svnbook.red-bean.com
    Everything you need to know about SVN.
  • 30. Thanks (:
    Jordan Hatch - @1jh
    http://www.jordanh.net/