Version control gives development teams the ability to do just as its name implies: control which version of a project or data repository is the master version of a project, with all changes between versions being tracked and timestamped. Version control systems are great for tracking and maintaining entire codebases without the old-school copying, pasting, zipping, and emailing steps most PCB designers are familiar with. There’s also the matter of cloning projects and building a revision history from a code repository.
If you’re a hardware designer, how can you take advantage of version control systems for your hardware project? External version control systems impose an extra step in your workflow, where files need to be checked out, modified, and revisions committed back into version control. Altium Designer users can take advantage of the sync capabilities in Altium 365 to help them mirror their version control system in a managed cloud platform. Users can also migrate their external SVN or Git repository into the version control system on Altium 365.
After talking about this topic with multiple designers, I’ve found that larger companies have some interesting ways of cataloging and organizing their projects, PCB docs, schematics, libraries, and any information needed in PCB design projects. Probably the two most common methods for organizing design data is by project, or by file type and part/project number. In any case, when there is an absence of a version control system, a team is probably holding a big group of projects in a folder somewhere.
There are a few instances where it’s a good idea to place your hardware and PCB projects into a version control system
Version control systems help streamline all of these tasks, and the choice for a PCB design team is which version control system they should use. Altium Designer users have the option of using the built-in Git repository in Altium 365.
The benefit of using the internal version control system in Altium 365 is that any projects in version control can be synced and opened directly in Altium Designer. There’s no manual file checkout process, and project revisions can be synced back into Altium 365 with a few clicks. In addition, everything in a PCB project is eligible for syncing and migration into Altium 365.
However, there are times where keeping an external version control system around is important. PCB design projects can be very complex and can be about much more than just the circuit board, involving mechanicals, a range of documentation, code for embedded software/firmware, and other essentials that are not yet present as managed objects in Altium 365. There’s also the case where a company is dealing with privileged data for a design and is not permitted to place data on a server they don’t directly control. In those cases, it makes sense to sync only the relevant PCB project data, while other data can be kept in the external repository.
If you’ve ever used Altium Designer with a version control system, you may have noticed a hidden “.git” folder in your project folders. This folder is Altium Designer’s cue that a version control system is active for this project. As soon this .git folder is recognized in a project folder, Altium Designer will enter Simple Sync mode and will prepare to sync back to Altium 365.
There are a few options for syncing to version control locally:
Create the .git folder locally using the following Git Bash command line entries from your project folder:
Use TortoiseGit or another tool to create the local .git folder
Use the “Make Available Online” command in the Projects Panel
Once you open the project in Altium Designer, the presence of the .git folder will trigger Simple Sync. You can then use the standard Push and Commit commands to place the project in Altium 365’s formal version control. Using external version control tools allows these repositories to be created locally in batches, and they can be synced back to an Altium 365 Workspace when needed.
When a managed project is opened in Altium Designer, the files are checked out from internal or external version control in the same way. This is a great way for companies with a large amount of data in an external VC as they can ensure their Altium projects are synced up with their primary version control system. However, if you want to migrate entirely to the version control system in Altium 365, there are a few ways to do this.
The simplest way to turn off version control for the project is to delete the .git folder in your project folder. Unfortunately, this removes all the revision history, so it’s not the cleanest way to pull a project out of your external version control system.
Once you do pull the project from your external system, you can then immediately enter the project into Altium 365’s internal version control system with the options listed above. Probably the best option is to use the Project Packager:
The Project Packager will create a snapshot of your project, without the baggage of version control. It will also strip any links to the project if it was previously made available in your Workspace.
You can now delete the project from the old repository or abandon the repository altogether. You could also leave this repo for other uses that may be relevant to your project but don’t involve tasks in Altium Designer.
Finally, if you’re more adventurous and want everything synced across version control systems, you’ll need to create a script that performs mirroring. Ari Mahpour was generous enough to write some great articles on creating a Git-based workflow for Altium Designer users:
Also, everything above has been discussed in terms of Git, but you can create managed SVN repositories with version control. Read this guide in the documentation to learn more.
Today’s PCB manufacturers and PCB designers can share project data and easily collaborate using the Altium 365™ platform. PCB design teams can use the internal version control features for design data management, and everything integrates with the world-class design tools in Altium Designer®. Altium 365 lets you share your project data with other designers, manufacturers, and customers in a secure environment.
We have only scratched the surface of what is possible to do with Altium Designer on Altium 365. You can check the product page for a more in-depth feature description or one of the On-Demand Webinars.