
Open the merge tool and address the conflict. Ignore the changes in the repository and use your local ones instead. Ignore your local changes and use whatever is in the repository. In the big box, you will see all the files and events where conflicts have occurred. If there is a conflict, you will get a window that looks like this: The following are the most common conflicts you will come across.Īfter you commit your changes and pull from the repository, GameMaker will compare all the files and check for conflicts. Identifying and fixing merge issues requires experience and running into these cases, but once you understand the basics behind the solutions, you will be on your way to solve any issue.

It would be impossible to cover every single possible merge conflict you may encounter while working on a project with other people. With the diff/merge tool configured, let's take a look at how to resolve the most common merge conflicts. To diff, you only need two files, base, which is the version before the conflict occurred, and theirs. We are asking the program to open three files when merging: the local file ( mine), the file on the repository ( theirs), and the output ( merged). Here are the lines in question, to make it easier to copy/paste into your editor: You need to locate your diff/merge tool (it may differ from mine), and the parameters to send the program when it is called. In GameMaker, go to Preferences > Plugins > Source Control (Git). I will cover how to set up KDiff3, but you can use your favorite tool.įirst, go to and download the latest version of KDiff3. There are many tools that achieve this purpose. GameMaker Studio 2 doesn't come with a built-in diff/merge tool, so you will need to download your own and set it up.

This article will explain how to identify and solve the most common ones. However, if multiple people are working on the same project, it is very hard not to modify the same file at one point or another, so you will encounter these merge conflicts. If you are working alone, the Merge and Commit Merge sections will most likely never happen (unless you are committing from a revision that is not the head). Make Changes -> Save -> Commit -> Pull -> Merge -> Commit Merge -> Push Quick reminderĪs mentioned in the first post, the basic loop when using source control is as follows:

The windows may look different from yours, but the options are all the same. The article is divided into the following sections:ĭisclaimer about screenshots: I am using a custom skin in GMS2. In this post, we will cover how to deal with merge conflicts. If you haven't read part one yet, I suggest you do so by clicking here. Hello again! This is the second part in our series about setting up source control in GameMaker Studio 2.
