Subversion Saves the Day - UA Web Developers Group
Download
Report
Transcript Subversion Saves the Day - UA Web Developers Group
Subversion Takes Back the
Night
How Version Control makes web
development better
WHY?
Track your changes to show them you really are
working
Rollback mistakes without rolling on your rifle in
despair
Experiment safely without borking the “real” code
base
Collaborate sanely with both “Lone Wolves” and
“Dream Teams”
Key Concepts
Revision:
Repository
Group of files at same
stage
Everyone’s stuff
combined
Working Copy
Your own stuff
Repository
Your
Working
Copy
Her Working
Copy
Your Subversion Toolbox
A Client
Windows: TortoiseSVN
OSX: SCPlugin
Linux: the CLI, of course
Lots of plug-ins for Editors / IDEs
A Server
Subversion on a local file system
Apache: mod_dav_svn
Making a Repository
Make an empty directory
Create a repository there
Add 3 directories:
trunk
branches
tags
(Subversion basically requires this)
Create your directory for a working copy
Use Case: Lone Wolf
Keeps Personal Repository on local File system
Has a Hard Time Sharing
Deploys Files to Web Server with:
Capistrano
Phing
Ant
Or simply “svn export” because he’s a lone wolf who doesn’t
believe in the sanctity of build scripts
“Lone Wolf” Workflow
Add Files to Repository
Hack…hack…
Commit to Repository
Client: “What have you done for me
today, Wolf?”
1.
2.
3.
Here you go: “svn log –r {2010-01-13}:HEAD”
Use Case: Dream Team
Central Repository on Web Server
Lots of loving, group-based development
…each with his/her own working copy = FUN!
Dream Team Workflow
Teammate: “I’ll do this part, you do that part and
then we’ll merge!”
You: “You bet, buddy!”
Hack…hack…
svn commit
svn update
svn status
“Oh No! A merge conflict”
Diff it
Edit it
‘svn resolved index.php’
Re-commit
Wrap it up
http://subversion.tigris.org
http://svnbook.red-bean.com/
Questions