It says I have a Merge Conflict? Help! That sounds scary! - HPetch/DES203-Group-15 GitHub Wiki

You are gonna be fine!

Merge Conflicts happen when someone else has edited the same file as you. Git gets confused and can't make a good decision about which one is the most up to date version.

In some apps you can see the issue and manually correct the issue, but we can't do that with UE4.

Instead, you will be asked to choose between your local version and the origin version.

Make sure the person who was editing the file (you can check this on the History tab in GitHub Destkop) and you check in with eachother in #editing-timetable and make sure who has the most up to date file.

I have the made the most changes and I want this to appear on the server.

If you are confident the version you have is the most up to date version and the other person has committed a less updated version, you want to choose your local version.

  1. Click the "View conflicts" link at the top of GitHub Desktop.

  2. For each conflicting file, click the Restore dropdown arrow, and choose "Use modified file from (Branch Name Here)". For example, "Use modified file from master".

image

  1. Click Continue merge

  2. Push to Origin ASAP. It's at the top of the screen in the big bubble.

My version is out of date / mistakenly edited. I want to overwrite my file with the one on the server!

You should choose "Use modified version from origin/(Branch Name Here)".

  1. Click the "View conflicts" link at the top of GitHub Desktop.

  2. For each conflicting file, click the Restore dropdown arrow, and choose "Use modified file from origin/(Branch Name Here)". For example, "Use modified file from origin/master".

image

  1. Click Continue merge

  2. Push to Origin ASAP. It's at the top of the screen in the big bubble.

Getting this right is important as otherwise we'll be dealing with lost work due to it being overwritten. It is possible to retrieve the work but it has knock-on effects that is best avoided if possible!