Working with Version Control Systems

Choosing a version control system to work with MPLAB® X IDE and store your project files is the first step. Working with the interaction of the repository and MPLAB X IDE is the next step.

Saving Project Files

Not all MPLAB X IDE project files need to be saved in a repository; some are automatically generated. The following table lists project files that either need or do not need to be committed to a version control repository.

Table: Project Files Saved to Repository

Directory or File(s) Commit?
Project directory
Makefile support_yes.jpg
Source files support_yes.jpg
build directory support_no.jpg
dist directory support_no.jpg
nbproject directory
configurations.xml support_yes.jpg support_yes.jpg
project.xml support_yes.jpg
Makefile-* support_no.jpg
Package-* support_no.jpg
private directory support_no.jpg
Green Check: required to generate the project image
Red X: these directories/files are regenerated and therefore do not need to be saved

See MPLAB X IDE documentation for more on the project structure.

For more on using local file history and/or source control, see the table of contents for the NetBeans help topics under IDE Basics > Using the IDE Help System > Versioning Applications with Version Control.

Resolving Conflicts in Version Controlled Files

Inevitably, conflicts will arise between a file you are trying to check in and the same file in the revision system repository that others have modified.

To understand how conflicts can be resolved, see the example below.

Example: Conflict in configurations.xml
To resolve conflicts on the file configurations.xml:

  1. Conflicts will be announced in the MPLAB X IDE (a) warning dialogs and/or (b) the output window.
  2. Click on the Files tab in the Projects window. Expand the nbproject folder. Find the file named configurations.xml. It should be in red font, signifying conflicts.
  3. Right click on configurations.xml and select RCS > Resolve Conflicts, where RCS is your revision control system. This will open the Merge Conflicts Resolver window.
  4. The Merge Conflicts Resolver window allows you to fix conflicts. For more information, see the table of contents for the NetBeans help topics under IDE Basics > Using the IDE Help System > Versioning Applications with Version Control.
  5. After fixing the errors, close the project. If the right click context menu for the project does not work, close the project using File > Close Project.
  6. Reopen the project. The conflicts should be resolved.

Building a Project with Read-Only Files

To build a project where files have been checked into a repository and some may then be read only:

  1. Commit the minimum number of files to source control. This is explained in Saving Project Files.
  2. Make the files nbproject/configurations.xml and nbproject/project.xml writeable.
© 2017 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.