Skip to main content

Resolving conflicts

Conflicts arise when several members work on the same files. They always become visible after a sync or after a merge of a branch. While text files can usually be merged, conflicts can happen here when two members have edited the same line. On binary files, merging is not easily doable, that's why here we need to decide who is "right" and pick one of the two conflicting file versions as the correct one.

Nothing gets lost when a conflict happens. Both versions of a file are stored in the history, and resolving the conflict only decides which one becomes the latest version. The other version can be restored at any time from the Revisions page.

How to "merge" binary files

There is no automated solution to merge a binary file. However, if you are working with document formats such as Photoshop, Blender or SolidWorks documents, you can open both versions in the application and complete a merge manually by copy&pasting the content of the document to another.

To access an older version of these files, to go the Revisions page, and pick the corresponding revision. In the right sidebar, select the file and open the context menu. There you should see the option Restore. Once you click it it will ask you to either Overwrite or Keep original of the file. Use Keep original to have both file versions next to each other.

When conflicts show up

After a submit

When you click on Submit, Anchorpoint pushes your revision to the Lore server. If somebody else pushed to the same branch before you, the server combines your work with theirs and creates a merge revision. Anchorpoint then syncs that merge back to your computer, depending on your Submit and push behavior setting.

  • If the same files were changed on both sides but the changes do not overlap, the sync goes through and you see a Submit complete or Submitted and synced message.
  • If the changes overlap, Anchorpoint shows Merge conflicts detected with a Resolve conflicts button. Click on it to jump to the conflicting files.
  • If Anchorpoint does not sync automatically, a Sync required dialog appears. Your changes are already on the server, but you cannot commit again until you click on Sync now.

After a sync

Clicking on Sync on the Revisions page can also end with Merge conflicts detected if somebody else changed a file that you changed in one of your local revisions.

Files you are still working on

Anchorpoint never overwrites a file that you have changed but not committed yet. If such a file was also changed on the server, the sync is stopped before anything is touched. You will see a message like 2 files conflict with the server — move them to a branch, then sync, or the Sync required dialog lists the files and disables Sync now.

In that case, do this:

  1. Create a new branch and check it out.
  2. Commit the affected files on that branch.
  3. Switch back to your original branch and sync. Now the server version is on your computer.
  4. Merge your branch back. If the files still overlap, you resolve them as a regular conflict as described below.

After a merge

When you merge a branch, the merge dialog already tells you whether Conflicts detected or No conflicts detected. If you merge with conflicts, the merge stays open until every conflict is resolved.

Resolving conflicts

As long as a merge with conflicts is open, the Revisions page shows a red Conflicting files entry at the top of the list. It tells you how many conflicts are remaining and how many are already resolved. The Changed files page is empty during that time and asks you to resolve the conflicts first.

Click on Conflicting files to open the list of conflicted files in the right sidebar. A red icon marks a file that still needs a decision, a green icon marks a resolved file.

Picking a version

Hover over a file and click on Resolve to open both versions next to each other. For binary files such as images, 3D models or documents, Anchorpoint shows your version on the left, the version of your team member on the right and the resulting Latest version below. Pick one:

  • Take mine keeps the version that is on your computer right now. This is the safest option. The version of your team member stays in the history and can be restored at any time.
  • Take other uses the version of your team member as the latest one. Your version is stored in the history and can be restored at any time.

Click on Resolve to confirm. The file turns green in the list.

For text files, both changes are shown inside the file with markers for the Current Change (yours) and the Incoming Change (the one being merged). Use Accept Current, Accept Incoming or Accept Both on each conflicting block, or edit the file in any text editor, then click on Resolve. The button is only enabled once no markers are left in the file.

Resolving several files at once

Right click on one or several files in the sidebar and choose Take mine or Take other. To resolve every remaining conflict in one go, right click on the Conflicting files entry on the Revisions page and choose Take all mine or Take all other. Files you have already resolved are not changed by that.

If you changed your mind about a file, right click on it and choose Mark unresolved.

Finishing the merge

Once every file is resolved, Anchorpoint shows All conflicts resolved and the Finish merge button at the top of the Revisions page becomes active. Clicking on it creates the merge revision on your branch. This revision is local, so click on Push afterwards to get it to the server.

While the merge is open, you can also click on Cancel merge to discard all decisions and go back to the state before the merge. Anchorpoint asks you to confirm this. If you have changed other files in the meantime that are not part of the merge, commit or revert them first, otherwise the merge cannot be cancelled.