What is Version Control?
- Version control is a repository that is the central store of files with a system that helps to manage and track changes made to these files.
- Useful for tracking code changes and allows you to rollback changes if necessary
- Allows for conflict resolution if files on your local system do not match what is stored on the server.
- Supports Branching, which lets you branch your code and is necessary
when doing parallel development. You can make changes to branches
independently and then merge branches back into the main branch when
complete. Ideally, you would have the following branches:
- Developer Branch – Used for each developers line of development. Allows them to save incomplete work without interfering with others.
- Project Branch – considered the main development line. Should contain working builds
- Release Branch – Merged here when all changes have been compiled and tested in Project branch.
- Note that not all customizations through the Setup are available through the metadata API and therefore these will need to be reproduced for each org.
- When you checkout a project for the first time, you need to apply the Force.com nature at the project level. This is done by selecting Add Force.com Nature at the project level.
- You can click Project properties from the Force.com context menu to connect the project to your Salesforce organization.
- Because development is being done by multiple developers, most companies do nightly builds to verify the validity of check-ins (see image below)