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 git gud

Initial situation: You have a Game Maker Studio 2 project that you want to publish on GitHub.

  1. Enable source control for your project

    You do this on a per-project basis by opening Options > Main in 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.

  2. 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 https://github.com/glitchroy/git-test.git.[1]

    Empty repo on GitHub

  3. 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 repo access.

    example on GitHub

    Make sure to copy your personal access token - you won’t be able to see it a second time!

  4. Setting up GMS2

    Navigate to File > Preferences > Plugins > Source Control (Git). Open Add User/Pass Authentication under Authentication. Add the repository URL from earlier, your username and your newly generated personal access token.[1]

    New credentials in GMS2

  5. 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 Control menu above.

For external diff tools and other features, you can refer to the documentation or the aforementioned blog post.


  1. I’m using https authentication and personal access tokens, since it is easier to set up. If your setup includes SSH keys, you probably know how to set these up, too. In any case, this guide will point you to the right menus.  2