Salesforce and GitHub

GitHub was founded in 2008. Git, the open source protocol on which it was built, had been around since 2005. But until GitHub came along and provided a significantly easier user interface for interacting with Git, it hadn’t done all that much to supplant tools like Subversion and Mercurial as leading source control tools. But GitHub’s UI made collaboration much easier than it had been in the past, and software developers quickly grew to love the platform and it’s Octocat mascot. By 2009, there were over 46,000 public Git repos hosted on GitHub.

Why use GitHub?

As you know, we at Blue Canvas believe that Salesforce developers should use Git. It’s a great tool for collaborating and solves a lot of the existing problems with the Salesforce platform. Git will help you gracefully resolve merge conflicts so that you don’t clobber your colleagues code. GitHub has a nice user interface that makes using Git easier.

With GitHub you can visualize code changes and collaborate with other developers. GitHub Issues allow you track work tickets and talk to your team about them. We’ve talked to quite a few Salesforce devs who want to use GitHub Issues for keeping track of their open work. The UI also makes it easy to comment on lines of code and visualize commit history over time. All of this can be pretty useful. Salesforce teams may also want their metadata tracked in GitHub because they track code from other projects there.

Here is what it can look like to track your Salesforce metadata in GitHub:

github salesforce

The Challenge of Getting Salesforce Metadata into GitHub

However, it’s not always easy to get all your Salesforce code and metadata into Git. Tracking declarative changes in Git is hard. But declarative and code changes should both be considered equal citizens in Salesforce. And because Salesforce users can log directly into the Salesforce UI and make changes to orgs and production, often times your Git history is out of sync with your code as it is actually implemented and deployed.

Blue Canvas makes it easy to automatically commit your Salesforce metadata into Git. Blue Canvas automatically tracks changes to your metadata for both code and declarative changes and automatically puts them into Git. Since we operate on open standards, it’s extremely easy to integrate Blue Canvas and GitHub so that you can show your code in GitHub.

We’ve just published some new documentation on how to integrate Blue Canvas and GitHub to track all of your Salesforce metadata in Github. Please check it out and let us know what you think!