Using Git With Plastic SCM and Visual Studio Online

Sean KumarVersion ControlLeave a Comment

I had never heard of version control before I started delving into game development.

After playing around with it for a bit, I realized how powerful it is and what a life-saver it can be.

On the Unity forums, there is a great thread about version control and why it’s useful for game development. This blog post will not be about why it’s useful (as there are so many articles out there about this subject), but about my journey of finding a solution for my needs, eventually finding Plastic SCM and Visual Studio Online.

In my first foray into version control, I was using the Mercurial distributed version control system with BitBucket for cloud hosting, and SourceTree as my Mercurial GUI Client. With the help of numerous tutorials online showing how to get this all set up with Unity, it wasn’t too difficult to figure out. The beauty of all these three are that they are all free; BitBucket gives unlimited public and private repositories for up to 5 users. Things were going smoothly, and I was grateful that such a free solution existed.

Then two things happened which made me look into other solutions. First, I saw in a Unity update that they were including integration with Plastic SCM, a version control system for large-scale projects. Second, I saw here and here that BitBucket introduced size limitations for their repositories. Given that game projects can potentially have very large sizes if you include all the binary assets like audio, textures, etc., I was concerned that my next project would grow past the size limitations. There are ways around this, like splitting up the repository or storing assets in Dropbox, but I didn’t want to have to do anything which required extra work. I just wanted one online place to store a backup of all my source code and assets.

After checking out Plastic SCM and how it is geared towards game development, I decided to try it out. It is a proprietary version control system, although it does contain GitSync, a way of using their GUI with any git repositories like GitHub, BitBucket, etc. After running through a couple of tutorials and getting familiar with the GUI client, I fell in love. See this gallery on their website. I was grateful for SourceTree being free, but Plastic seemed much easier to use. Plastic’s GUI is not only pleasing to the eyes, but makes the information accessible in an intuitive way for novice programmers like me.

There was good news and bad news. The good news was that they have a Community Edition which is free for less than 15 users! The bad news was that to use their plugin in an integrated way with Unity, I’d have to pay for the plugin and a Unity Team license. Now that may be fine for a small sized studio, but it’s out of reach of a lone indie dev. Even without the plugin, the system is pretty easy to install and intuitive to use with Unity projects. Another bonus is that Plastic SCM is able to handle large file sizes, something that Git and Mercurial are supposedly not that great at. My only concern was finding an online hosting solution to use with Plastic SCM. I could use a second computer in my house as a server, but what if a fire or theft happens, and I’ve lost both computers? I needed to find another solution.

First I tried using my web hosting account. I spent a couple of days on the Plastic SCM forum and with my hosting provider to get this set up, only to realize I don’t have enough priveleges on my shared hosting account to do it. I then found this blog post which outlined how to set up Plastic SCM with an Amazon EC2 instance. This is great as an alternative, but after a year of free usage, I’d have to start paying Amazon for the service.

Next I tried finding a cloud-hosting solution for my game code and assets. Almost all online code repositories don’t support Plastic SCM, as it is relatively newer. Codice Software, the makers of Plastic SCM, mentioned on their forums that they’re looking to set up their own cloud-hosting solution soon. I’m looking forward to see what they’re going to come up with. Hopefully they’ll have a free or low-cost solution for lone indie game devs.

I looked around at a bunch of sites which offered free Git hosting for private repositories (to use with Plastic SCM’s GitSync), but almost all of them have low space limitations. That’s when I found out about Visual Studio Online. They are offering free, private, cloud-hosted source code repositories for up to 5 users. While chatting online with one of their representatives, and searching online for any limitations, I found out that Microsoft’s plans are to offer repositories of unlimited sizes for now. Hopefully people won’t abuse the system like they did with BitBucket and mess it up for the rest of us.


Here’s a mini tutorial on how to get both Plastic SCM and Visual Studio Online set up using Git:

  1. Download and install PlasticSCM for your OS from their website after registering. If you’re using Windows, during installation it may be better to switch the default embedded SQL Server Compact Edition to SQLite, as SQL Server Compact Edition only supports repositories up to 4GB in size, and SQLite does not have that limitation. I believe the other OS installers already have SQLite as the default embedded database. If you don’t do it during setup, you can use their Admin Tool to do it later, and you can also choose where you’d like to store the databases. Don’t forget to download your free community edition license and follow their instructions on the download page for where to place it.
  2. Create a Visual Studio Online account. You’ll get an email confirmation. Go to your account page and create a project, making sure to select Git and not Team Foundation Server. This will create a repository online. Navigate to the Code page for the project and leave it open.
  3. Create a workspace (project location) and repository in the Plastic SCM GUI. I’d recommend going through their documentation on how to do this, or do their step by step tutorial first to become familiar with Plastic.
  4. Once you’ve added your code and files, created your ignore list (see here for Unity files and folders to ignore, just make sure to follow Plastic’s conventions), and made your first checkin, go to the Branch Explorer. Right-click somewhere in your main branch, go to Replication -> Sync with Git… and enter the path to your repository in your Visual Studio Online account. You can find this information in the page you left open in Visual Studio Online in your created project’s Code tab ->Explorer view, if empty. Enter your username and password for your Visual Studio Online account. Go ahead and sync, and presto! You’ll have your repository replicated in Visual Studio Online!

As of now there is an error which pops up stating “Input string was not in a correct format” although all files will be synced correctly. I’ve enabled logging per their instructions and will send a log to Codice Software the next time I receive the error. Hopefully this will be fixed soon.

I’m currently applying for Microsoft’s BizSpark program. If I get accepted, I’ll soon be posting a tutorial on how to get Plastic SCM set up with an Azure Virtual Machine using Plastic’s own proprietary system, if I”m successful. This will mean free version control hosting on my own Azure virtual machine for 3 years!

Hopefully you’ll figure out a solution which works for your needs. As usual, if I’ve made any errors, please feel free to point them out in the comments section below. Thanks!

Leave a Reply