43 Folders

Back to Work

Merlin’s weekly podcast with Dan Benjamin. We talk about creativity, independence, and making things you love.

Join us via RSS, iTunes, or at 5by5.tv.

”What’s 43 Folders?”
43Folders.com is Merlin Mann’s website about finding the time and attention to do your best creative work.

Getting into Version Control

Short Version:

I think it's high time I got my act together and started using version control for my web design and programming work. Two questions I'd like you to answer: How do you/should I go about making version control part of my working process? and What is a good version control system for my needs? (I have been overwhelmed by all the strangeties of SVN in the past.) The first question is the most important for me as I can pretty much adjust to most anything.

Longer version after the jump...

Long Version:

Here's the thing. Many of you know that I'm a web designer. What I'm here to admit today is that heretofore I have not been using a version control system. I have some new projects about to start up as well as some pretty ambitious programming projects that I'll be working on over the next semester and in my last year of school working on a big group project. So, I thought now would be a great time to get my act together with version control.

My work obviously requires that I do a fair amount with binary files such as images and occasionally sound. So, any version control system would need to handle that stuff gracefully. I'd also like for whatever system to integrate in some capacity with Finder. I'm not averse to the command line, but switching to Terminal to do version control operations is one more step that I fear might keep me from actually using it. I have my hosting account with Dreamhost, which offers ootb SVN repositories, so that might be the simplest solution. Also, and help with workflow issues such as dealing with multiple projects (multiple repositories or one repository with multiple projects?) is greatly appreciated.

As a way of sort of getting into my head with this stuff, it might help if I describe my modus operandi for a project. All of my project folders get treated like a "document" and shoved into my catch-all "~/Documents/trunk" folder and organized by color label. (See also my blog post about organizing my files. Most of my web design projects consist of a simple top level directory with three sub directories for images, javascript, and stylesheets. In the past, if I was going to get experimental with a particular aspect, I'd just make a _bak copy of the file in question and go to work. Not too sophisticated. My programming projects go into ~/Code/$languagename/$projectname, so for my class programming assignments, ~/Code/Java/ProjectName. Again, nothing to earth-shattering. But I did want to show that I do keep my projects separated more than just by project. Maybe I should be keeping my web design projects in ~/Sites. Ach, but I digress...

Finally, I think I have been overwhelmed by the alien concepts in SVN. Branches? Tags? Trunk? WTF? So, perhaps a simpler system is in order. I know Git, Mercurial, and Bazaar are the cool new kids, but is there something else out there that I'm not considering?

Thanks in advance as always for your help, 43F Hive Mind.

ev's picture

Re: Getting into Version Control

Long time svn user (and cvs in the dim dark days before that). Recently started using bzr but still feeling my way through a few issues with it.

If the command line is anathema to you, then I think svn is your only real option. As previously mentioned, smartsvn is a pretty good client that runs on macs (unlike tortoisesvn). As someone else already commented, you can use it in a purely local file shared mode if you don't need remote access, although if you are already running an apache serer and know how to configure it a bit, it isn't too hard to set up.

I started using svk, which is a pseudo-distributed source control system layered on top of svn, which isn't bad to use if you have to use svn but like being able to do a bunch of commits locally and then push them all up when you're ready (probably not a big issue for you).

I ended up using bzr because I had a requirement for doing a development project with a partner, and we had no access to an svn server for various reasons. With bzr, we are using a mutually accessible ftp server as our "central" repository that we push and pull our local changes to/from for each other.

The one thing I've found nice about bzr, git and mercurial is that unlike svn, which makes a ".svn" folder in each folder of your source tree, they only make one folder (".bzr", ".git", etc) in the base folder of your tree. Its one of those things that I didn't even know annoyed me until it wasn't there anymore.

If you are having trouble getting your head around svn, I would use bzr or mercurial (hg) over git unless you wanted to make your head explode.

The one think I can identify about mercurial (and git for that matter) that I like over bzr is that it uses a hash (SHA1 I think, or MD5) to identify revisions and branches, which bzr does not. I can see some extreme usefulness in that. (Unfortunately neither mercurial or git could handle a repository over only FTP, which was the deal breaker in my recent project.)

And if you go with svn, contrary to what someone else said, I wouldn't necessarily just use one big repository. I would at least use one per client. That way at least, you can easily archive off the repositories for old clients/projects without too much fuss.

And for the person asking about non-traditional uses of a source control program? I'm using bzr with a shared repository for my different eclipse installations. How's that for untraditional? I basically have four flavours of eclipse that I use for various development: java, c++, php and ruby.

So I have the classic install, which I then branch to by base version. On the base version I install all the plugins that I want on every eclipse install no matter what (viPlugin being the primary one). Then I branch off that one for each of the eclipse flavours I am using.

That way, when it comes time to load updates, I can do them as the base version, and then pull those to all the child branches easily, then let them add their own specific updates.

It also means I can easily try a new plugin or an update to something, and if it doesn't work or turns out to not be what I wanted, I can revert back to an earlier, stable version of my development tools.

[Brain dump complete]

 
EXPLORE 43Folders THE GOOD STUFF

Popular
Today

Popular
Classics

An Oblique Strategy:
Honor thy error as a hidden intention


STAY IN THE LOOP:

Subscribe with Google Reader

Subscribe on Netvibes

Add to Technorati Favorites

Subscribe on Pageflakes

Add RSS feed

The Podcast Feed

Cranking

Merlin used to crank. He’s not cranking any more.

This is an essay about family, priorities, and Shakey’s Pizza, and it’s probably the best thing he’s written. »

Scared Shitless

Merlin’s scared. You’re scared. Everybody is scared.

This is the video of Merlin’s keynote at Webstock 2011. The one where he cried. You should watch it. »