Version Control – Should Code Be Hosted Online?

closed-sourcecloud computingversion control

We're looking for a good source control and project management solution at my workplace and I've suggested creating a GitHub organization and private repositories. I love GitHub for many reasons, but this isn't about GitHub (in fact my colleagues are going to present points in favor of competing platforms) – it's about storing our private code online.

I'm trying to understand whether this is a good idea or not. It definitely seems advantageous because it removes need for server costs (at least directly) and also makes it easier to search code (everything is online).

However our team is undecided and leads me to my question, what should we be considering in order to make this decision?

Best Answer

As a pro,

If your company's office burns down, the code is still on the server.

If your company's office doesn't burn down, but the server on which your git repository is located DOES, then you still have a local copy.

If you host your repository on your server in your company's office building (like you would with a Network shared drive...?), then if the company's office burns down, you lose both.

Of course, you still need backups as usual...

Feel free to replace "burns down" with "gets infected with ransomware".

Basically, availability is up.

As a con,

You'd have to share your files with the 3rd party that will host your code. If you've got really big company secrets, this might not be allowed. For instance, if you have a database containing personal info from european citizens, you might not be allowed to host your code on a third party from the USA - because they'd be subject to US law and thus couldn't be relied upon to uphold EU privacy laws. Even if it is not a legal issue, you should be aware that the third party could be bribed into giving your private files away. This would likely be really bad for the third party (huge reputation penalty), but it could happen.

Basically, confidentiality is down.


If you are okay with trading confidentiality for availability, then hosting your private code online with a third party is a good idea. Otherwise, don't. You could explain the trade-offs to allow your boss to make an intelligent decision - but you might hear "no". That's what can happen if you give someone a decision. If your boss says no, then that's that. I don't think forcibly convincing your boss is a very good idea.

Related Topic