QuickStart to Git version control for Godot 4.2

Learn how to use GitHub on a Godot 4.2 project in a 5 minutes. We will use the free version of Anchorpoint to push and pull our files to GitHub.

Matthäus Niedoba
May 27, 2024
min read

In this tutorial, we will setup GitHub for a Godot project using Godot 4.2. We will use Anchorpoint as a Git client to push and pull our files to GitHub. All of this works with the free version of Anchorpoint.

Why should I use version control?

Version control is a cornerstone of your workflow with Godot or any other game engine. Game engines do not understand incremental saving and you don’t want to copy and paste your “backup files” on your desktop. Version control solves that problem and allows you:

  • 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

The difference between Git and GitHub?

Git is a version control systems. Alternative solutions to Git are Perforce, Unity Version Control or SVN. Git is free and open source and has a huge ecosystem of cloud providers, applications and knowledge. GitHub is a cloud provider, that is based on Git. You can even download the Godot source code from there. GitHub will act like a “Dropbox alternative” where you will push and pull files.

If you want to work purely offline, of course you don’t need GitHub. But everywhere on the internet, people will recommend it’s usage for solo developers as well, because you have a free backup solution.

Why do I need Anchorpoint?

You don’t need it. You can also use the Git command line, if you like that or a Godot Git plugin. Anchorpoint acts like a Git client such as SourceTree or GitKraken. Anchorpoint is made for non coders, while the others are mostly made for developers. The benefit of using such an application is that you have a better overview of your history and if you incorporate your art files (Blender, Photoshop etc.) you can also version them with Git. So you have a unified clean workflow.

Set up Godot, GitHub and Anchorpoint

The whole setup requires just 3 minutes. We will use the GitHub integration in Anchorpoint, so that we can create repositories directly from it, which is faster than doing this on GitHub.

Godot Git settings
Adjust the version control settings in Godot first
Godot Git settings
Pick Git and press OK
GitHub website
Create a new account on GitHub
Download Anchorpoint, then click on "Connect Application" to connect it to GitHub
GitHub integration in Anchorpoint
Click on "Connect" on GitHub
GitHub integration in Anchorpoint
Click on "Start GitHub Login"
GitHub integration in Anchorpoint
On GitHub, click on "Authorize Anchorpoint-Software"
GitHub integration in Anchorpoint
Finally, "Test and Activate" the integration
create a new project in Anchorpoint
Create a new project, which will create a new Git repository
Git settings in Anchorpoint
Pick Git repository, add your Godot project, under remote settings pick "New GitHub Repository" and for the template for .gitignore pick "Godot"
Create a project in Anchorpoint
Change the name in the previous step if you want, and then click on "Create Project" to create the Git repository. You can add members at this step, but you can also do this later.

Syncing local files with GitHub

For the first time, we need to commit all of our files to GitHub. “Commit” means just to create a version that we can go back later on. It’s like creating a checkpoint of your project. In Anchorpoint you will sync the files, which is a combination of a commit and a push to GitHub.

sync files with GitHub
In your changed files, you need to add a message and them click on "Sync" to push the files to GitHub

Now, make a change in Godot by e.g. adding a comment to your code or by adding a new asset.

sync files with GitHUb
In this example we made a change to our code. The corresponding file shows up. Add a comment and click on "Sync" again.

When should I commit?

There is no hard rule when you should commit your work. The recommendation is when you made a meaningful change to your project. E.g., you implemented a new input system or your made a significant update to that input system. Once you are done, commit that as a new version.

You should at least commit your files when you finish your daily work.


How much storage can I have on GitHub?

As of today, you can have 1GB of storage in the free tier. If you need more, you can buy storage packs. If you think, that you need a lot of storage (more than 150GB) then it makes sense to switch to Azure DevOps, because as of today, there are no storage limitations.

What is a .gitignore file?

A .gitignore file is a central component for managing your Godot projects using Git. It is a set of rules that tells Git which files to exclude from version control. When you adjust the version control settings in Godot, it will automatically create the .gitignore file. Each game engine such as Unity and Unreal have different .gitignore settings.

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 introduces 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. With Anchorpoint, you don’t encounter any Git LFS related commands, because that happens in the background. If you use other clients, you will need to configure Git LFS at the beginning of your project.