We use Mercurial for our embedded projects at the office, including MPLAB X. I came up with the following guidelines for the team when Mercurializing MPLAB X projects:
- Version all of the source files in the project root directory (duh)
- Version the Makefile in the project root directory
Inside \nbproject, version the following:
Inside \nbproject\private, version everything:
This works well for us where we have varying operating systems and varying versions of MPLAB X. Cloning the repo and opening it works, MPLAB X will recreate the missing files and away you go. The only nuisance will be having to select your own programmer/debugger in project config, but there's no avoiding that - MPLAB X tracks the tools by serial number.
Before starting all this, we also figured out that we need the compilers to be installed in a common location (C:\Microchip\MPLABXC16\vX.XX, C:\Microchip\MPLABXC32\vX.XX, etc.) because depending on 32-bit or 64-bit O/S they end up in \Program Files or \Program Files (x86) which was problematic. I don't think this is still necessary with the above versioning scheme - YMMV.