This article will show you how to quickly set up a git repository in Game Maker Studio 2. I will use GitHub, but you can use any remote repository that you want.
I will assume you know your way around git and are just looking for a way to navigate around the menus in GMS2.
If you want an introduction to git and its use in regards to Game Maker Studio 2, I recommend this blog post by Ale Hitti.
Also note that I am explaining my own work flow, which is solo development and mainly using source control for backup and overview purposes. You may want to use a different git application altogether if you are working as a team, since the built-in tools are quite limited.
5 Minutes to
Initial situation: You have a Game Maker Studio 2 project that you want to publish on GitHub.
Enable source control for your project
You do this on a per-project basis by opening
Options > Mainin the tree view on the right and enabling
General > Enable source control.
A global option is also available by navigating to
File > Preferences > Plugins > Source Control (Git) > Automatically enable source control. This will enable source control automatically for all future projects.
Create an empty repository on your remote
Make sure to not intialize the repo with a README or anything else. You want an empty repository. Make note of your URL, which in my case, is
Create a personal access token
Personal access tokens are a way for third party apps to interact with your account. This is a feature of GitHub, GitLab, BitBucket and probably a lot of other well known sites.
Since you don’t want to store your account password in GMS2, you will generate a personal access token to use in the app. For GitHub, you can do this by navigating to your account settings and going to
Developer settings > Personal access tokens > Generate new token. Make sure your token has
Make sure to copy your personal access token - you won’t be able to see it a second time!
Setting up GMS2
File > Preferences > Plugins > Source Control (Git). Open
Add User/Pass Authenticationunder
Authentication. Add the repository URL from earlier, your username and your newly generated personal access token.
Import your project
Since you enabled source control for your GMS2 project, you should have a new menu option in the top navigation bar. Navigate to
Source Control > Import Project into Repository. Add the URL and the project will be pushed with the commit message
initial commit. You can now commit, push and pull using the
Source Controlmenu above.