Git with Blender

In this article we will explore how to use Git version control in Blender, relying on Git LFS. We will take a look at the pros and cons and which tools to use. After reading this article, you should be able to decide if this workflow is right for you.

George Neguceanu
October 16, 2024
8
min read
Content

Why use Git

Whether you are developing games, creating films or art assets, using version control solutions such as Git or Perforce can help you improve your workflow, provide instant backup and give you a transparent view of your work. 

In addition, you can have a clean file structure, for example, no more character_final_03.blend, and the ability to work with linked files when you are building a large scene that includes many other models, and of course you can easily work in a team.

blender incremental saves joke
“Perfect” file classification

With Blender you can use the link libraries to reuse materials, objects and other data blocks that have been loaded from another blender file. Every time the link files are updated, so are your scenes, so you can keep up to date with other artists' materials and objects, or simply reuse assets so you don't have to create new ones.

Using Blender Link library to reuse assets
Reusing tree models with the Link feature

What is Git and what is GitHub?

GitHub is a popular cloud service built on top of Git, a version control system, and offers several additional features to help you manage and automate tasks. 

You can access GitHub using Git commands or, more conveniently, through desktop applications such as Anchorpoint, which allows you to easily push and pull files from GitHub.

Version control systems in the git ecosystem
Version control landscape

What is version control?

Version control, or source control, refers to the practice of tracking and managing changes to software code. Version control systems are tools that help software teams monitor changes to source code over time. As development processes have accelerated, these systems allow teams to work more efficiently and collaboratively.

Git vs Dropbox

Apps like Dropbox are easier to understand, but they can only handle incremental storage, whereas using version control with Git, which requires commits, gives you a better view of the project, what each update to the project has done and by whom, along with the ability to revert to a previous version if needed. You also get instant documentation of your project when using version control.

Anchorpoint timeline
Using version control, you will see who has done what at which time

Can Git handle large files?

Despite the common misconception that Git can only manage text files, this is not true. Originally designed for Linux kernel development, Git has grown to become a universal version control solution, now used by 93% of software developers.

Git LFS (Large File Storage) extends Git's functionality to support binary files such as 3D models, audio and images that are not text-based. Anchorpoint handles Git LFS automatically, while other Git clients require you to enable it manually. Every major Git hosting service, including GitHub, supports Git LFS natively.

While Git is sometimes seen as a challenge when it comes to managing large binary files, recent features such as sparse checkout and Git LFS have significantly improved its performance on large projects. For more details, explore how Git scales to manage 1TB of files.

Tools you need

To use Blender with Git, we need two things:

1) A cloud provider such as GitHub or Azure DevOps

GitHub is the most popular, but its Free and Pro plans have a file limit of 2GB, 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.

Alternatives such as Azure DevOps offer more flexible LFS storage options at no extra cost. You can also set up your own Git server for complete control over your files.

2) A desktop application such as Anchorpoint, GitHub Desktop or Sourcetree

Anchorpoint Blender Project overview
A blender project in Anchorpoint

In this tutorial we will use Anchorpoint because it is ideal for artists and has all the configuration for 3D creation suites like Blender 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. 

Git for 3D projects

Anchorpoint is a one-button version control solution optimized for game engines and art assets.
Learn about Anchorpoint

How to use Blender with Git, Anchorpoint and Azure DevOps

Setting up Azure DevOps

Start by creating an account at dev.azure.com. Once set up, you can create a new project in Azure DevOps. Although the process can be a bit tedious, it only needs to be done once.

azure devops account creation
Visit dev.azure.com and click on "Start free"
microsoft azure account creation
Begin the account creation process
Once you've reached this point, you are nearly done setting up DevOps

Setting up Anchorpoint

To connect Azure DevOps to Anchorpoint, follow the setup process below. If you need to work offline, you can select the Shared Folder option when creating a new project.

connecting an application in Anchorpoint
Connect Azure DevOps to Anchorpoint
Click on "Connect"
Click on "Authorize Anchorpoint"
A consent screen will appear, accept it
Select your organization where Anchorpoint will create repositories, then click "Next"
Follow the on-screen instructions. You'll need to enable "Third-party application access via OAuth" on Azure DevOps, then create a test repository.
Set up your Git credentials by clicking "Login to Azure DevOps". A new window will open, where you can sign in to your account.

What to do if something goes wrong

When setting up Azure DevOps, you may encounter some issues, such as login problems. These can be resolved by using custom credentials - just follow the instructions under the “Use custom credentials” option.

Creating a Project

To turn your Blender project into a Git repository, create a project in Anchorpoint and select your project folder on your hard drive. Once the project is created in Anchorpoint, it will automatically sync with Azure DevOps.

Creating a new project in Anchorpoint
Click the "New Project" button
Creating a new Blender Git Repository with Anchorpoint
Navigate to the folder containing your Blender files, ensuring the ".gitignore template" and "Remote Settings" are configured properly. Then, click "Continue".
Lastly, invite team members you want to collaborate with, or leave it blank if you're working solo. Each member must have an Azure DevOps account.

Uploading your Blender project to Azure DevOps

When Anchorpoint detects uncommitted changes, it will prompt you to enter a message and commit them. Once committed, press "Sync" to upload the files to Azure DevOps.

Initial Commit for a Blender project
Your history will initially be empty. Click Timeline, then Changed files to see a list of your project files. Anchorpoint recognizes Blender Engine actor files, displaying the correct name and thumbnail. Add a meaningful message and click "Sync".

The .gitignore file

The .gitignore file specifies which files should not be uploaded, such as build results, temporary Blender files or the DerivedDataCache. In this case, a custom .gitignore file called DCCs is used, which is optimized for managing art assets.

What your team members should do

Your team members will need active Azure DevOps and Anchorpoint accounts. After you invite them to your project, they will receive a notification. They'll need to select an empty folder on their hard drive where Anchorpoint will download the project from Azure DevOps. 

Once team members are invited to the Anchorpoint project, they can download all project files from Azure DevOps. The first time they do this, they'll also need to connect Anchorpoint to DevOps by entering their DevOps credentials.

Workflow

Within this new version control environment, instead of saving in incremental steps, you just do the work and push it to the cloud. It takes some getting used to, but it saves you time, you don't have to create dozens of files, it improves your workflow and keeps your project structure clean.

  • You work in Blender
  • You push
  • You work in Blender
  • You push
  • Etc.

During each push, Anchorpoint will check for file changes made by your team members and download them before uploading your changes.

Frequently asked questions

Can Git handle big files?

Yes, it can, since the introduction of Git LFS. You will hear a lot of opinions on the internet that Git does not scale well, or only works well for text files. This is no longer the case. We did a test with a Git repository with over a million files and 1TB of storage, and it works pretty well.

Why is Git not a standard way of working with Blender?

Git (or working with any version control system) feels unfamiliar to most artists. Software developers are used to it, and if you use a game engine, you need a version control system. When working with Blender you can also save incrementally (v001, v002,...) which also does the job and you can put the files in a Dropbox or similar. However, using a version control system gives you some advantages such as a solid workflow, instant backup, an overview of who has worked on what, a clean file browser and "for free" documentation.

Is Git free?

Yes, Git is free and open source. If you choose not to use Anchorpoint, you can use any other application that is compatible with Git.