Your version control system is not a file system

If you find yourself needing to check binary files into your Version Control System, something isn't right. Your VCS is optimised for tracking changes to source files. When you have multiple revisions of a source file, the VCS has stored the original file and the changes between revisions. This is good.

When you check in a binary, it doesn't really do that. Most systems just keep a separate copy of the binary for each revision. So if you store 10 revisions of a 100 megabyte file, you can kiss a gigabyte goodbye. You might argue that disks are cheap. Unfortunately the cost of storage isn't the issue. It's the downtime to upgrade the server, it's the admin overhead and risk of moving all of your data to a new disk. Sure you can do it.

Or you could stop using your VCS as the most expensive file system in your organisation.

Update: I wrote this in response to a contractor putting a 325mb file into my previous employer's Perforce repository. I should qualify some of the statements in the post - for example there's every reason to put small binary files in as part of your app. I think most people choose to check in binary dependencies into their projects rather than take the Maven/Ivy route.

DevOps New Zealand