Syncing your USB stick with an SVN repository is a smart thing to do if you work on a project from multiple computers. It’s even smarter if you occasionally work on a public computer such as at a café, library or university. By syncing your USB stick with an SVN repository you’re creating your own personal mobile development studio.
It’s brilliant. An evil overlord must always be ready to flee the scene quickly…
Why sync with SVN?
If you carry the latest version of your files on a USB stick, the day will come when you lose all your files. USB sticks are small and portable which makes them prone to loss or theft. What you should carry on your USB stick is the ability to access the latest version of your files. FTP or VPN are two ways to access your files, but SVN has many advantages over them if you’re working with and changing files frequently (read/write!).
What are the advantages of SVN over FTP and VPN?
FTP, VPN and SVN all have different purposes. If you’re working on the development of software, SVN is the clear winner because it will track changes made to your files and allow you to revert to an earlier version if necessary. If you work on the same files from a few locations or if you are part of a team of developers, SVN will also make merging the files together extremely easy.
If everything you have read so far makes sense, then you might be interested in another debate, Git vs SVN – Which is Better? Otherwise, just keep reading.
Why use a USB stick? Can’t I just download an SVN client, get my files and start working?
If you lose your USB stick, then yes, you can use an SVN client to get your files and begin working. This however is unnecessary overhead. By using your USB stick you can sit down at any computer and immediately begin working. If the computer has network access you can first get the latest version of any changed files. If the computer doesn’t have network access, you can still work on the version saved on the USB stick and then merge this with the latest version the next time you do have network access.
Time is money. How do you expect to finance your evil operations if you splurge your time? Carbon-14 isn’t about to stop decaying every-time you twiddle your thumbs.
Are there other advantages to using a USB stick for development?
Another advantage to using a USB stick for development is that you don’t need to save any files on the computer you’re using. If you’re working on private documents or proprietary software it is especially important not to leave behind source code! Working from the USB stick is much more convenient because you don’t have to constantly delete all your files when you’re done. Just take them with you. (If you’re forgetful and your project is private you should also consider encrypting the data on your USB stick…! Read my Top 5 Things to Put on Your USB Stick)
Getting started: Install Rapid SVN on your USB stick
Put a copy of Rapid SVN (http://rapidsvn.tigris.org/) on your USB stick so that you can connect to your SVN repository and access the latest version of your files. When you’re ready to work, checkout the latest version of your files into a folder on the USB stick.
When you’re done working on a file, add the latest version back into the repository. Your USB stick and the repository will now both have the latest version of the file. If you lose the USB stick, your files are safe. If you move between computers, your privacy is safe. If you go offline, you can still work.
It’s the perfect mobile development solution.
This is all great information assuming I have an SVN repository. How do I create an SVN repository?
First you need to decide if your project is open source or private… If your project is open source, there are many free SVN hosting providers available. I use Google Code for my Looble Labs projects (http://code.google.com/p/looble/) and GitHub for Battle City. Below are some free SVN hosting providers for open source projects:
- http://code.google.com/
- http://www.assembla.com/
- http://github.com/ (Not SVN… Read more about git http://git-scm.com/)
What if my project is Private? Can I still use SVN? .
If your project is private (not open source) there are still a few free options available. Below are some free private SVN hosting providers:
Can I host my own SVN repository on my computer?
Yes!
Subversion is an open source version control system. You can download the latest version at http://subversion.tigris.org/. You can find installation instructions at http://svnbook.red-bean.com/en/1.5/svn.intro.install.html
Git is also a free open source version control system. You can download the latest version at http://git-scm.com/. You can find installation instructions at http://book.git-scm.com/
Should I use SVN or Git?
In my opinion, SVN and Git are both excellent options. I use SVN for my Looble Labs projects and Git for Battle City. For more information read Git vs SVN – Which is Better?