8.9 Source Control: Revision Control Systems

When developing a complex application that consists of many files, especially as part of a team, controlling source code changes becomes a necessity. MPLAB X IDE provides a built-in method of source file versioning and supports external revision (source or version) control programs.

Several revision control systems (RCSs) may be used with the IDE. Once set up, revision control actions can be accessed through a context menu.

Currently supported source/version control systems are Git, Subversion and Mercurial. Other systems may be supported through plugins (e.g., CVS).

When using a revision control system for your MPLAB X IDE projects:

  1. Try to keep all project files within the project. Files outside the project will also need to be included in the repository so the project can find them.
  2. In MPLAB X IDE, commit only the files from the project. This is important as inclusion of unwanted files can prevent the project from compiling on other machines. See Saving Project Files.
  3. Resolved any conflicts when checking in using the Merge Conflicts Resolver window. See Resolving Conflicts in Revision Controlled Files.
  4. Check read-only files in per Building a Project with Read-Only Files.

To set up source/version control:

  1. Team menu – select a version control program from the submenus and set up that version control program (see the figure below).
  2. Tools > Options (MPLAB X IDE > Preferences for macOS), Team > Versioning – set up version control options.
  3. Window > Versioning – open version control windows.
Figure 8-8. Version Control Options

Working with Git

Follow these links for more on Git:

Working with Subversion

Follow these links for more on Subversion:

Working with Mercurial

Follow these links for more on Mercurial:

Working with CVS

To use CVS with MPALB X IDE, you must install the CVS plugin. See 8.11 Plugin Tools.

Working with Other Revision Control Systems

Other revision control systems may be added as plugins. See 8.11 Plugin Tools.