SVN or Git with SolidWorks

Solidworks collaboration

I’ve recently written a post on the SolidWorks forum trying to answer the question of a VCS usage (Version Control Systems) such as Subversion of Git with SolidWorks files, principally as a lightweight alternative to SolidWorks PDM. I duplicate the post content here to help even more users.
Be careful: This article deals with SolidWorks, the Mechanical CAD software, not SolidWorks PCB which is its Electronics CAD cousin.

SVN or Git?

As a mechatronic Engineer, I regularly make board designs, create enclosures and 3D prototypes, and write software programs. I use both SVN and Git, and I think both are fantastic. Collaborating on any kind of projects, seeing what changed and why, and being able to roll back, is something I couldn’t live without.

  • Git, as a Distributed VCS (DVCS), brought the ability to work in parallel on a same project or same file, even for huge project teams. It’s a bit more complicated than SVN at start, but the feature-branch workflow with the audit/review step associated to a pull-request are a must. Except that they’re completely useless with CAD files… (no merging capability)
  • SVN is a Centralized VCS (CVCS) and is pretty well integrated to Windows thanks to TortoiseSVN, making it user-friendly: you can manage your files right inside the Windows Explorer, which removes the hassles out of VCS – no command line to learn (it’s quite hard to say the same about Git). You keep track of the work all along the design phase, and you know which version you sent to manufacturing thanks to “tags”. The workflow is not imposed by SVN, making it completely flexible and suitable for CAD.

As you may have guessed, I use Git for everything related to writing code, and SVN for everything else.

Which one is good for SolidWorks?

I see 3 major advantages of SVN over Git in a “CAD design” context:

  1. Better binary files handling.
    The xdelta compression algorithm embedded in SVN manages them pretty well, keeping the repository size reasonable.
  2. File locking feature (exclusive locks).
    No conflict to resolve. That’s an absolute necessity because conflicts are almost impossible to manage with CAD files – the diff/merge tools simply don’t exist in most cases.
  3. Partial check-out of a repo (or “sub-repo checkout”).
    Wonderful if you work with big files but you don’t want to split the project over several repositories.

There are some other advantages (multi-project repo, “by directory” access control, human-readable revision numbers, SVN externals used for libraries, …) but these are the main three. For those who absolutely prefer Git, Git LFS is probably the right way to handle binary and/or large files. If you’re an existing user of an other DVCS (Mercurial, Bazaar, …) I’m not sure if equivalent systems exist.
Important note: with SVN and with Git, you hold a local copy of the project on your computer. It brings the ability to work off-site for mobile workers, but of course you can’t collaborate with remote peers while your offline, neither with Git nor with SVN.

Do I need to push my files over the Cloud?

An important point to remove confusion: using a VCS doesn’t mean storing files in the Cloud! Your IT guy/team will be able to install a Subversion and/or Git server on your organization’s infrastructure without any restriction because both are Open Source and free to use.
If you want open/worldwide collaboration capabilities, then go to a hosting service: Assembla (SVN & Git), A2 Hosting (SVN), GitHub (Git), Bitbucket (Git), or any other.

CAD file comparison

Someone on the SolidWorks forum stated:

For the moment, svn/git can’t make diff on SolidWorks file

Well, Version Control Systems are in charge of storing different versions of some files, and allow you to retrieve them back if needed. VCS like SVN or Git are not in charge of rendering or diff’ing those files. Your CAD tool is.
I know SolidWorks has capabilities to compare two files, I encourage you to test them. Altium Designer (ECAD software) is able to compare two (binary) files, probably like SolidWorks PCB is (it’s based on Altium). If you take some time to integrate your VCS system tightly with your design tools, you would be surprised on how good the workflow could be! I wrote an article about Altium Designer with TortoiseSVN.
Even the MS Office toolsuite (Word and Excel, at least) has an integrated comparison tool! You don’t trust me?

SVN or SolidWorks PDM?

Many users report that SolidWorks PDM is complex, non-intuitive and hard to deploy and manage. I also read that some users may use SolidWorks PDM only at the delivery stage: what if you mess up a file in the design phase?!
PDM is even used by some of you to store ECAD files. Honestly, I don’t understand how can’t it be an absolute nightmare…

Get me out of here

To me using a VCS such as SVN or Git is an advantage to using a proprietary solution like PDM:

  • The user experience could be shared across professions in the same organization, in particular if they use the same VCS
  • File sharing is made easier, between peers and between professions
  • Maintenance could be done by a VCS person (no need to have a SolidWorks PDM specialist)
  • Do you also use Inventor, Creo, CATIA, Solid Edge or an other desktop CAD tool? SVN works the same!

Because things are not well integrated between SVN and SolidWorks (yet), I’m thinking of writing a piece of software myself. Are you interested? Feel free to write a comment in order to get in touch!

WordPress Cookie Plugin by Real Cookie Banner