A lot of organisations have this challenge, not just for source code, but for personal data, intellectual property etc - so a lot of work has been done developing solutions.
McAfee, Symantec and various others have very effective products on the market which can be tailored from very simple (looking for signatures in a similar way to how an antivirus scanner works and blocking on hits) all the way up to full data management by classification and access controls at every network egress point, including printers, USB devices, email, web connectivity etc.
Depending on the value of the data, and its type, you will need to look at your approach. For data which is structured like social security numbers, credit card numbers etc a signature approach may well work just fine, however source code isn't usually this simple.
A full solution allows you to classify every file, document, application or in fact anything on your systems, and then place controls at database, OS, network and storage levels which will allow/disallow/alert when an attempt is made to move them.
As has been pointed out, you would also want to restrict mobile phones with cameras (but this would be a really cumbersome way to steal large quantities of source code) and have your USB devices locked down, but those are already standard in many organisations.