When working with Diversion, you may encounter different types of conflicts that can disrupt your workflow.
Understanding these conflicts and how to resolve them is crucial for maintaining a smooth development process.
These conflicts occur mostly during branch merges, when changes from different branches affect the same file.
However, merge conflicts can also happen inside your workspace in the following scenarios:
You have Auto-Update turned on, and other team members have made commits to the same branch.
You switched branches in your workspace, and your workspace contained uncommitted changes,
or you chose to unshelve changes on the target branch.
You cherry-picked another commit into your workspace.
When a merge conflict occurs, the changes are stored outside your workspace in the cloud,
which you can review and resolve in the desktop app.
In Diversion, your work-in-progress workspace is stored both locally and remotely.
While file updates usually sync from your local workspace to the remote one, it is also possible that the remote
workspace has newer changes that need to be synced down to your local copy.
For example, this can happen if your workspace has Auto-Update turned on (the default) and other team members have
made commits to the same branch. Another example is when you merge changes from another branch into your current branch.Sync conflicts happen when your local changes haven’t had a chance to sync to the remote mirror of your workspace,
while the latter has received changes from new commits that modify the same files you have edited locally.
Having your workspace sync paused or being offline for a while, increases the chances of encountering sync conflicts.
On the other hand, working alone on a branch, or turning off Auto-Update reduces the chances of sync conflicts.When a sync conflict occurs, Diversion automatically creates a backup of your locally edited file with a .dv-conflict
suffix, and overwrites the original path with the incoming contents. This helps ensure you don’t lose your work.
These files are only created to indicate conflicts and are not intended to be committed to the repository.
Hence, they are not tracked by Diversion and you can’t commit them.When you have local conflicts, your workspace in the Diversion desktop app shows a warning:
and you can view the list of backed up conflicting files in the Flat Changes tab of the workspace:
The conflicting files will have a special icon and color:
In the above example, the file syncing.mdx (containing incoming changes) has a conflict with a backup file
syncing.dv-conflict.mdx (containing the user’s local changes that aren’t synced).
The content of the .dv-conflict file is viewable in the app, but with no history.You can safely ignore the .dv-conflict files and continue working and committing as usual with the rest of your files,
including the original file that was conflicted. However, we recommend resolving conflicts as soon as possible before
the differences become too hard to merge.The .dv-conflict files are not automatically deleted, so you should delete them yourself once you resolve the conflicts.
You can delete them one-by-one in the Diversion desktop app, or in a batch from your file explorer.
Use the context menu item Show in Explorer/Finder to quickly locate the file and delete it.
If this is an Unreal Engine resource, such as uasset, then it’ll be impossible to open both versions inside the editor
due to broken redirectors in the backed up file (because its name has changed).
Please do the following:
Make sure the original file has no changes (if there are, either commit or reset them before dealing with conflicts).
Overwrite the original file with the .dv-conflict version.
After the file is overwritten, you can open it in the editor and review the differences between the two versions.
Once you have resolved the differences, you can commit the changes or reset if you don’t want them.
Delete the .dv-conflict file (if you left a copy when overwriting) to clean up your workspace.
For other file types, such as text files or images, the process is as follows:
Use your preferred local diff tool to compare the versions, such as Meld, WinMerge, VSCode, etc. or open the files side by side.
Apply your edits to the original file path, and commit once you’re ready.
Delete the .dv-conflict file to clean up your workspace.
If you don’t clean up the .dv-conflict file, it will remain in your workspace, which may accumulate several conflict backups, e.g. file.dv-conflict.txt, file.dv-conflict-1.txt, file.dv-conflict-2.txt, etc.