Salesforce.com and Subversion
by Patrick Connelly posted on April 29, 2009
Our team has since switch to git. For more information read my article on our git workflow
From what I’ve been able to tell, there is no real version control built into Salesforce.com and this is a problem when pushing from a sandbox instance into a production instance. To fix this problem (at least until Salesforce does something), I think the best option is to use the Force.com plugin and the Subclipse plugin for Eclipse. With both of these in place, it should make version control a reality.
- Install Eclipse for your platform (it’s eclipse-platform if you are using Fedora)
- Install both the Force.com and Subclipse plugin (eclipse-subclipse)
- Add your Force.com project to Eclipse (Howto)
- Add your SVN repo to Eclipse. (Howto)
- Share your Force.com project (Right-click on Project name → Team → Share Project → SVN → Choose repo)
- Then after updating a file in the Force.com project, commit the update to SVN before deploying to the server
Now if you want to use this in another Eclipse instance then, you’ll want to do the first two steps to prepare your Eclipse environment. Then:
- Add the existing SVN repo to Eclipse (Howto)
- Right click on the Project Force.com → Project Properties and update the username / password
When using this in a collaborative setting, the following workflow should be followed whenever possible.
- Team → Update
- Make changes to code
- Team → Update
- Make changes to resolve collisions if needed
- Team → Commit
- Force.com → Deploy to Server