Logbook.
Basic Subversion May. 6 at 12:27 pm
Here are some of the basic commands I use regularly for managing web projects with Subversion. I find it’s relatively easy to rely on the command line rather than GUI tools, but I do like the SCPlugin for Mac OS X.
Setting up a repository on my VPS:
svnadmin create /path/to/svn/reponame
svn mkdir file:///path/to/svn/reponame/trunk
Getting the working copy locally:
svn co svn+ssh://servername.tld/path/to/svn/reponame
Committing local changes:
svn ci -m "description of changes"
Branches and tags:
svn copy svn+ssh://servername.tld/path/to/svn/reponame/trunk \
svn+ssh://servername.tld/path/to/svn/reponame/tags/tag_name
Ignoring files per directory, by pattern:
svn propedit svn:ignore .
CodeIgniter Specifics:
Here are the files I usually ignore for a CodeIgniter site:
system/application/config/config.php
system/application/config/database.php
system/logs/*
system/cache/*
Because they have server-specific content, I’ll rename the config.php + database.php files with a .default extension and commit so they don’t overwrite when deployed.
Typically I’ll have a local working copy for development, and check out a copy on a development server for browser testing and client review — a simple svn up will update to the latest revision.
When it’s time to go live I’ll svn export to the live host and all that needs to be done is change the permissions of the cache and logs directories, adjust the config.php and database.php files for the new host, and turn off error reporting in /index.php.
Recent Entries
- Tide data for Canada Apr. 26 at 10:41 am
- Simple Referral Tracking Nov. 9 at 7:52 am
- Ruby HTML Indentation Jun. 27 at 9:47 am
- SSH Keys May. 28 at 5:01 am
- More logbook entries