How to migrate binary files in a Git repository to Git LFS
If your Git repository is blowing up due to large sizes, you may not be using Git LFS. Here is how to fix this issue.
SolidWorks is a widely used 3D CAD software, popular in both educational and professional environments. With a robust design, simulation, and technical documentation capabilities, it is an ideal tool for a wide range of engineering and product development tasks. While platforms like Unreal Engine and Blender are sometimes used for design purposes, many professionals prefer purpose-built tools like SolidWorks for their specialized capabilities.
Version control, also known as source control, is the practice of tracking and managing changes to files, most commonly source code. These systems enable developers and teams to collaborate more effectively by maintaining a history of changes and supporting parallel development efforts.
Sync solutions such as Dropbox or Google Drive are not ideal for version control because they lack file locking, a history view of the change list, and the ability to easily revert to a clearly defined state, features that are highly needed in CAD environments.
Git is a widely used version control system, similar to tools like Perforce, SVN, or Unity Version Control. Its open source nature and robust ecosystem, including platforms like GitHub, GitLab, and Azure DevOps, as well as desktop clients like SourceTree, Fork, and GitHub Desktop, make it a popular choice for many development teams. For engineers, Git can also improve workflow through distributed collaboration, allowing team members to work independently and merge changes later.
When managing SolidWorks CAD files, two common options for version control are Git and SolidWorks PDM (Product Data Management). Each serves a different purpose depending on team size, complexity, and workflow requirements. In general, Git is better for individuals or small teams, while SolidWorks PDM is better for larger teams with more advanced needs
Git originally struggled with binary file management and file locking, both of which are important for CAD workflows. However, recent improvements, especially with Git LFS and Git clients like Anchorpoint, have made Git a viable solution.
SolidWorks PDM is a proprietary system designed specifically for CAD data management that integrates seamlessly into the SolidWorks environment.
The choice between Git and SolidWorks PDM depends on your project scope, team size, and budget. Git offers flexibility and affordability for smaller teams, while SolidWorks PDM offers a robust, enterprise-level solution with deeper integration for larger organizations. If you're interested in trying Git with SolidWorks, read on to learn how to set up your project with Anchorpoint and Azure DevOps.
To use Solidworks 3D CAD with Git, we need two things:
While GitHub is the most popular Git provider since it offers a Free and Pro plan, it has a file limit of 2GB (Free), while the Team plan allows files up to 4GB and the Enterprise plan up to 5GB. GitHub offers 1GB of free storage, after which it charges $5 per month for 50GB of storage and bandwidth.
A better alternative for large binary files is Azure DevOps which provides a more flexible LFS storage option at no extra cost. You can also set up your own Git server for complete control over your files.
In this tutorial we will use Anchorpoint because it is ideal for artists and engineers, and has all the configuration for 3D creation suites like Blender / CAD projects ready to go, and it can also generate thumbnails of the models based on the last camera position save you made, and even with texture if saved on the material preview page.
Begin by registering an account at dev.azure.com. Once your account is set up, you can proceed to create a new project within Azure DevOps. While the initial setup might feel a bit cumbersome, it's a one-time process, where future projects will be much quicker to configure.
To link Azure DevOps with Anchorpoint, follow the setup instructions outlined below. If you plan to work offline, you can opt for the Shared Folder method when initiating a new project.
During the Azure DevOps setup, you might face some common issues like login difficulties. These can usually be resolved by selecting the Use custom credentials option and following the provided steps.
Open Anchorpoint and create a new project. Choose the local project folder on your hard drive. Once set up, Anchorpoint will automatically begin syncing with Azure DevOps.
When Anchorpoint detects uncommitted changes, it will prompt you to enter a commit message. After committing, simply click Sync to push your files to Azure DevOps.
The .gitignore file helps exclude unnecessary files such as build outputs, temporary CAD files, or the DerivedDataCache. In this workflow, a tailored .gitignore file named DCCs is used, optimized specifically for managing digital art assets.
All team members must have active accounts for both Azure DevOps and Anchorpoint. Once you invite them to the project, they'll receive a notification. They'll need to select an empty folder on their system, which Anchorpoint will use to download the project from Azure DevOps.
This type of version control system simplifies the process: instead of saving multiple incremental files, you can work continuously and push updates directly to the cloud. Although it may take some time to adjust, this method enhances efficiency, keeps your file structure clean, and streamlines collaboration.
With each sync, Anchorpoint checks for updates from other team members, downloads them, and then uploads your latest changes.
One of the many extra features of Anchorpoint is Custom Thumbnails, which allows you to right click on an art file and replace its thumbnail. To do this, first sync/commit your new or changed files, open the desired image or tool/engine viewport, switch to Anchorpoint, right-click the desired art file, and click Replace Thumbnails. Drag over the desired view and the thumbnail will be replaced. If you failed the first time, right-click on the file again, and select refresh the thumbnails, and start the thumbnail replacement again. Sync files when you are done.