Git for CAD

Version control systems like Git and Solidworks PDM are a valuable way to maintain the integrity of design files. Iterating through the design spiral for a single part can cause large changes to the entire system, and being able to track those changes can substantially reduce errors through the development of the system. Version control systems also allow easily rolling back design changes and trying new designs, methods, and/or processes across teams of engineers.

The Value of Version Control

Git works best with diffable files, and CAD files tend to be undiffable binaries. This means that Git effectively rewrites the entire file for each commit, instead of only recording changes. So why use Git to track CAD files? Git is free, ubiquitous, and easy to use. Implementing a Git version control process for CAD costs nothing, there are numerous guides online and community support for using Git, and multiple OS independent ways of managing file commits to meet any user’s needs.

Why Use Git?

Some CAD programs, like Solidworks, like to make unnecessary changes to files referenced by the file you have edited. For Solidworks 2013+, this can be mitigated with a few changes in the Options menu:

First, under Collaboration, check the boxes to “enable multi-user environment” and “Add shortcut menu items for multi-user environment.” This adds a shortcut to the File menu for acquiring write access to a file.

Next, under External References, check the two boxes at the top to open referenced documents as read-only and save yourself time not needing to repeatedly tell Solidworks not to save read-only referenced files. This prevents Solidworks from making unnecessary changes to referenced documents, which saves users and Git lots of time.

CAD Setup for Git

The two primary use cases are collaboration and version control. For collaboration, I also recommend implementing a standardized feature tree and assembly layouts, since having unified standards can reduce collaboration overhead. Regardless of the intended use, ensure that commits change the smallest number of files needed. If collaborating, communicate which files are under development. Avoid modifying the same file in different branches, since Git will not be able to merge the commits and a user will need to manually combine the altered features.

Using Git with CAD