How to use GitHub on a Unity project

A beginner's guide to collaborating on a Unity 6 project using Git version control and GitHub as a remote repository, updated in 2025.

George Neguceanu
February 3, 2025
8
min read
Content

If you're new to version control and have only ever heard of "GitHub" or "Git" in the context of collaborating on a Unity project or backing up files, read on. However, if you're already familiar with Git and just need to set it up for Unity, skip to the "How to set up GitHub for Unity" section.

Using version control for an Unity project
Comment from reddit about a user not using version control. This article will help you to avoid the trouble.

In this guide, you'll learn:

  • What Git and GitHub are
  • How to use Unity and GitHub
  • Why version control is extremely important
  • A recommended workflow for Unity projects
  • The next steps

What is Git and what is GitHub?

GitHub is one of the most popular cloud services, based on the Git version control system, and comes with several additional features that can help you manage and automate tasks. To access the GitHub cloud service, you can use Git version control commands or, much simpler, a desktop application that pushes and pulls files to GitHub like Anchorpoint.

Git is the version control system, and GitHub is a cloud service provider based on Git.
Git is the version control system, and GitHub is a cloud service provider based on Git.

Can I use it for free?

On Git, there are plenty of possibilities, because it has the biggest ecosystem. GitHub has a free tier for unlimited users and gives you 1GB of storage. An alternative is Azure DevOps, which is free for 5 users and unlimited storage.

Why do I need version control? Isn't Dropbox enough?

A Dropbox is likely to damage your project. If you have the Unity project open in a Dropbox on multiple computers (which is exactly what happens when you work in a team), Dropbox will sync files instantly. If you are working on the file (say a .unity scene) and your team member is also working on it, this will cause a conflict that Dropbox will resolve by renaming the file. This becomes a nightmare to sort out. Also, WIP scripts that are changed due to file syncing will make it impossible to launch your game.

Version control can sync files as well, but as the name says, with more control. It allows you to:

  • To do backups for your project, in case your files get corrupted
  • To sync between computers
  • To share your files with your team
  • It forces you to work in a proper way by committing your work at least once a day
  • Adds documentation to your work
  • It facilitates team collaboration with features such as file locking, so that you prevent losing work due to the fact that two people have worked on the same file at the same time

Setting up a version control solution takes only a few minutes. It's definitely one of the first things you do when you start a new Unity project. Similar to file synchronization, there are several solutions available.

How to set up GitHub for Unity

Setting up GitHub for Unity is actually pretty easy and involves just a few steps. These are the components that we will use:

  • An existing Unity project
  • GitHub (for hosting our Unity files)
  • Anchorpoint (Our application that will push and pull our files to GitHub)

Git for artists

Anchorpoint is a one-button version control solution designed for artists and used by hundreds of game studios, architects and AR/VR creators.
Learn about Anchorpoint

Configure Unity

You can use an existing Unity project. If you are using Unity 2021 or newer, you don’t need to do any configuration. But just to double-check, make sure that asset serialization is set to force text and that meta files are set to visible. To do that, go to Edit / Project Settings:

Unity Project 6 settings / editor
Asset Serialization has to be set to Force Text
Unity project 6 settings / version control
Version Control Mode has to be set to Visible Meta Files

Setting up GitHub

Setting up GitHub requires just a few clicks.

Github main page
Go to GitHub.com and create an account
Github main page
If you arrived at the dashboard, everything is fine. We don't need to do more on GitHub right now

Setting up your Git desktop application

In this case, we will use Anchorpoint but you can also use any other Git client. If you use another Git client, you have to create the repository on GitHub and then copy the remote URL to your Git client. In Anchorpoint, we will use the GitHub integration.

Anchorpoint log in
Download and install Anchorpoint and create an account
Anchorpoint project dashboard
Scroll down to the integration section and click on "Connect Application". If you don't see this page, just create a new tab.
Integrations in Anchorpoint
Look for GitHub and click on "Connect"
Github and ANchorpoint
The web browser should open up with this page. Click on "Authorize Anchorpoint Software"
Git credential manager
This popup will show up after. This is the Git credential manager that checks if you have access to the Git repository on GitHub. Just "Sign in with your browser"
Git credential manager in GitHUb
And finally you have to authorize the Git credential manager on GitHub. Just click "Authorize git-ecosystem"
Integrations in Anchorpoint GitHUb
Now "Test and Activate" the GitHub integration in Anchorpoint
Integrations in Anchorpoint
If everything is fine, it should be marked as "Connected". You can close this popup now.
create a project in anchorpoint
Create a new project
Project creation in Anchorpoitn
Select "Git Repository". Browse to the place where your Unity project is located. In the Remote Settings pick "New GitHub Repository" and for the Template for .gitignore pick "Unity". Then press "Continue":
invite members to your team
In this section you are adding members on Anchorpoint. You have to add them later on GitHub as well. Just enter their email and click on Send Invite.
Add members to GitHub
Once the project is created, Anchorpoint will tell you that you have to add your members on GitHub.
Add members to GitHub
If you click on the "Add Member" button in Anchorpoint, you will land here. Click on "Add people" and add your team member to GitHub. They may have to create a GitHub account first, before they can work with you on the project.
Push your files from GitHub to Anchorpoint
Time to push your files. Click on "Timeline", then "Changed Files" and then on "Sync". This will upload all your files to GitHub.
How your repository looks on GitHub after you pushed your files
How your repository looks on GitHub after you pushed your files

Workflow and project setup recommendations

You want to make daily committing a habit in your workflow. You make a significant change (e.g., you created a new version of your character or implemented a major change to a game mechanic), then you want to commit it. Git commits are fast because they happen locally. When the commit is complete, you can keep working, and all your files are pushed to GitHub in the background.

File locking

You should use file locking on binary files, prefabs, and Unity scenes, because if you make a lot of edits to these types of assets, it can sometimes be difficult to merge and resolve conflicts.  

Prefabs, folder structure and naming conventions

A good approach to developing games in Unity is to split your work into prefabs to avoid conflicts, along with a proper folder structure and naming convention to avoid renaming as much as possible.

Branching

Keep it to a minimum. The basics should be a development branch and a release branch. Work on development, and merge to your release branch from time to time. If you want to dig deeper, take a look at the concept of "trunk based development", which explains a proper branching strategy for game development. A practice where you work on the main branch, but create short feature branches that merge back into the main branch every day.

A proper Git configuration

When using Anchorpoint, you normally don’t need to deal with these things, but if you use another desktop application such as SourceTree or GitHub desktop, you have to make sure that:

  1. Your .gitignore file is set up correctly. This is a configuration, so that we avoid uploading cache files such as “Library”, “Logs” or “Builds”
  2. Git LFS is installed and configured. This is an extension that needs to be enabled, so that Git can handle large binary files properly

What your team members need to do

GitHub

Once your team members are invited by you, they simply need to accept the invite and create a GitHub account. That’s all on GitHub.

Anchorpoint

Your team members will also receive an invite email from Anchorpoint. They have to download and install the application as well as create an account. Once they open Anchorpoint, they first have to accept the invite, and the corresponding project will open automatically.

Get a project invite in Anchorpoint
Your team member has to click Join Git Repository

After clicking on Join Git Repository, Anchorpoint will ask for the place where the files should be downloaded. In some cases, a popup appears that requires to install Git first, before Anchorpoint can proceed with the download.

During the download process, a popup from GitHub will also appear, where your member has to authenticate to GitHub so that Anchorpoint can download the files.

The workflow with Anchorpoint

When working with Git using Anchorpoint, it is basically a two-button solution. The process is as follows:

  1. You do your work in Unity.
  2. You open the Timeline in Anchorpoint, add a comment, and press Push.
  3. To get your changes, your team member has to Pull them.
  4. Your team member does their work in Unity.
  5. Your team member comments on their work and presses Push as well.

This workflow is like a file sync with more control. The recommendation is to push changes pretty often so that your team is in sync. It’s about developing a good habit of commenting on pieces of your work so that your whole project process is more transparent.

Undo, Revert and Restore with Anchorpoint

Anchorpoint has several options for restoring, reverting to previous versions of files in your repository, and even restoring the project to a specific commit state.

You can undo all file changes from a commit if you didn't change any files. You can revert files to the last state saved in the repository, or even revert the entire project back to a specific commit.

Undo / Restore a commit, project in Anchorpoint
Undoing a commit in Anchorpoint.

GitHub limitations

GitHub has some limitations when it comes to storage that can be an issue for game development. If you reach these limitations, a push will be rejected in Anchorpoint and you will get an error message. If these are an issue for your project, you may want to look to other solutions such as Azure DevOps or self-host your Git server using Gitea.

Individual file size limitations

The free version of GitHub limits file sizes up to 2GB. If you are on a paid plan, this limitation increases to 4GB.

Repository limitations

On the free plan, you have 1GB of free storage in your repository. If you need more, you need to buy LFS storage packs.

CI/CD build pipeline for Unity

Continuous integration and continuous deployment (CI/CD) are DevOps practices that help teams efficiently develop and release high-quality software. Within the Unity environment, CI/CD can automate various tasks, such as running tests across multiple builds or deploying to multiple platforms with a single action.

Implementing a simple pipeline can help identify bugs early in development and automatically generate and deploy builds for team leads to review and QA to test, whether on every commit, daily, or weekly. This streamlines production, minimizes overhead for team members, and allows them to focus on their core tasks, such as coding, art, or design. Read our guide on setting up a CI/CD build pipeline for Unity using GitHub Actions to learn more.

Alternatives to Git

As of today, there are three solutions worth mentioning when it comes to Unity projects.

Unity Version Control (formerly Plastic SCM)

Unity acquired Plastic SCM in 2021 after Unity Collaborate was discontinued. Unity version control is nicely integrated into the editor.

Perforce

Perforce is an enterprise-grade version control solution used primarily by AAA game studios. It's known for its great scalability.

Git vs Perforce 

Both get the job done when it comes to game development, and as a true version control solution they are much more powerful than Dropbox. Git does better in terms of branching and feature richness due to it’s popularity in the software development world. Perforce is better in terms of access control and scaling on TB sized projects. 

SVN

SVN (also known as subversion) is a centralized version control solution similar to Perforce.

Unity Collaborate

Unity Collaborate was Unity's own attempt to create a very simple version control solution. Unfortunately, this project has been discontinued and is no longer an option for us.

Frequently asked questions

What is Git in more detail?

Git is a version control solution that was developed for building the Linux kernel and was initially released in 2005. Git is a decentralized version control system. This means that you have a copy of the whole repository on your computer. A repository is basically your Unity project folder on a remote server, e.g., GitHub.

The benefit of working decentralized means that you can fully work offline, you have an automated backup system, and file operations are way faster because you don’t need to wait for a server. To sync with your team, you push (upload) your files to the remote repository, and you pull (download) new file changes from the repository to your local computer. These steps are done manually, in contrast to Dropbox, which is syncing files instantly.

What is Git LFS?

Git was made to deal with code, which is basically a bunch of text files. Games require a lot of binary files like 3D models, textures, sound files, etc. To keep the efficiency and to not download the whole history of your 3D models and textures, Git introduced an add-on in 2014 called Git LFS (Large File Storage). This add-on is now part of almost every Git product and service out there.

It helps to deal with binary files by storing them in a separate location on the remote server and replacing the original file with a 1kb sized pointer. This pointer only knows where the original file is so it can be downloaded to your local computer on demand. This allows you to save storage space.

When you decide on a Git hosting provider (GitHub, GitLab, Bitbucket, or Azure DevOps), you have to look at their Git LFS costs.

Why do I need a .gitignore file?

Unity produces a lot of overhead of files that store caches, build data, or anything else that you don’t want to upload to the Git repository. It will just take away space and slow down your push and pull procedures.

A .gitignore file is basically a filter that tells Git which files, file types, and folders should never be committed to the Git version history. Here is an example gitignore for Unity.

How does branching work?

When a project becomes more complex or the team gets bigger, friction arises. Work in progress commits from e.g. developers can disturb the work of the artist. To prevent this, you can split the project into certain zones. Each zone can then be used by a developer or artist without getting in each other’s way. When the work is finished, these zones are dissolved and merged into the project. Git calls such things branches. A short video in our documentation explains them pretty well.

The recommendation is to keep the number of branches very small. The reason is, when you work on your own branch for a long time, you may never run into conflicts. But, once you merge that branch to the main line (imagine this like a giant commit), all conflicts that you ignored have to be solved now. It’s better to run into conflicts early and solve them quickly by working only on one branch.

If you need branches, Anchorpoint allows you to create and switch them in the dropdown in the Timeline next to the Pull button.

Are there good alternatives to GitHub?

GitHub can work great if your project size is pretty small. As soon as you are in the double-digit gigabyte range, it’s smarter to pick another Git hosting provider such as Azure DevOps or self-host your Git server. We made a comparison in 2022 so you don’t need to spend so much time on research.