Git LFS conflict resolution?
Answerhub Git LFS Conflict Resolution
Does the git plugin works for conflicts on Blueprints tracked by Git LFS?
How to solve a merge conflict:
- When you "merge" two branches where a BP was modified on both branches, git mark binary files as in conflict
- but #37 Rebase workflow: conflicts not detected!: "pull --rebase" is breaking the plugin!
- The Editor shows a special "!" icon
- Click to open the UE Merge tool, that will display diffs (read-only)
- Choose the side you want to keep (one side will crash the editor, there was an recent question about it) (issue #46)
@brusiks said in #48 Git LFS conflict resolution not working:
Engine can't read uasset file if it is in a conflict state after merging branches. Because of GIT LFS there is not binary content of the uasset files and resolving of the conflict is not possible.
This is caused by the default merge driver for git lfs, it can be easily fixed by changing the merge driver to the git's default for binary files.
So, in a typical .gitattributes file we would have the entry for .uasset files similar to:
*.uasset filter=lfs diff=lfs merge=lfs -text
We change the merge driver to binary like so:
*.uasset filter=lfs diff=lfs merge=binary -text
That will make git choose the current version of the conflicting file (ref) and which will allow UE4 merge tool to work correctly.
We could improve the plugin in two ways:
- Detect when the driver is misconfigured and log;
- Add a way to automatically fix/replace the driver in .gitattributes
What do you think?
I will try to implement at least the first one.
Yes, very good to know indeed, thank you!