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:
- 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.
- 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.
- Resolved any conflicts when checking in using the Merge Conflicts Resolver window. See Resolving Conflicts in Revision Controlled Files.
- Check read-only files in per Building a Project with Read-Only Files.
To set up source/version control:
- Team menu – select a version control program from the submenus and set up that version control program (see the figure below).
- MPLAB X IDE > Preferences for macOS), – set up version control options. (
- – open version control windows.
Working with Git
Follow these links for more on Git:
- Git Website: git-scm.com
- Wikipedia: Git: en.wikipedia.org/wiki/Git
- Git Tutorial: git-scm.com/docs/gittutorial
- Using Git Support in NetBeans IDE: netbeans.org/kb/docs/ide/git.html
Working with Subversion
Follow these links for more on Subversion:
- Apache™ Subversion® Website: subversion.apache.org/
- Wikipedia: Apache™ Subversion®: en.wikipedia.org/wiki/Apache_Subversion
- Version Control with Subversion®: svnbook.red-bean.com/
- Using Subversion Support in NetBeans IDE: netbeans.org/kb/docs/ide/subversion.html
Working with Mercurial
Follow these links for more on Mercurial:
- Mercurial Website: www.mercurial-scm.org/
- Wikipedia: Mercurial: en.wikipedia.org/wiki/Mercurial
- Mercurial Tutorial: www.mercurial-scm.org/wiki/Tutorial
- Using Mercurial Support in NetBeans IDE: netbeans.org/kb/docs/ide/mercurial.html
Working with CVS
- CVS - Concurrent Versions System: www.nongnu.org/cvs/
- Wikipedia: Concurrent Versions System: en.wikipedia.org/wiki/Concurrent_Versions_System
- CVS Manual: www.gnu.org/software/trans-coord/manual/cvs/cvs.html
- Using CVS Support in NetBeans IDE: netbeans.org/kb/docs/ide/cvs.html
Working with Other Revision Control Systems
Other revision control systems may be added as plugins. See 8.11 Plugin Tools.