Version control for solo and small developers.
9th January 2015
Do I need version control?
Even as a small or solo developer, you should still be using version control.
It doesn’t matter what type of development you are doing, whether it be .Net web sites or Node applications, Python scripts or C++ libraries, you need version control.
- It allows simple rollbacks to known working versions.
- By branching, you can experiment without affecting your master code.
- It provides backups at a logical (commit) level rather than just dated.
- You can ‘share’ code without duplicating it, whilst retaining access control.
- It provides, via commit messages, clarity as to progress and current state.
This doesn’t mean paying a fortune for either TFS licences or the option to have multiple private GitHub repositories. I’m not here to tell you what would work for you, but to show what works for me. In my own time I’m a solo developer and at work I use some of the same tools amongst a team of six, so my toolchain may well work for you.
Source control software.
They have a free book on their site if you want more details, but basically it’s a distributed system rather than a client/server one so you can run it all on your own dev box (including full history) with or without a central server holding a copy of your repository.
I’m not going into more details (see Wikipedia or a search engine), but I recommend you try it. Small, light and fast.
Git hosting and a GUI.
Update - I’ve recently had issues with SourceTree showing stale information (Windows version; Mac is fine). I’m trying out GitKraken which is cross-platform (based on Node) and free for non-commercial use. So far it’s quirky but more reliable.
Deploying from source control.
Git lets you add multiple remote repositories. I push all my code changes to BitBucket so it’s perpetually up to date.
When I reach the point where I’m ready to make changes live, I push to the repository on my web server as well as BitBucket, and a git ‘hook’ automatically copies the result into place and bumps the server.
It’s called push to deploy and it makes putting the latest changes live a trivial process involving just a button press (more details in an upcoming post).
It’s not complicated once it is in place, and it’s free software, free GUI and free hosting.