Jump to content

Directory Merge Fail

Recommended Posts


while evaluating i come to the situation that i created the same directory in two different branches adding different files to it.

(At least i think it was what happend).

Now the merge failes because of a conflict in the directory merge.

A dialog pops up where i can select the files and rename the folders.

But what i really would have liked would be a way to integrate both directories.

Greetings Thomas

Share this post

Link to post
Share on other sites

Hi JarJarThomas,

What you're describing is almost an "evil twin" scenario.

Plastic identifies items (files and directories) with "unique item ids", so if you add foo.c to /main/task001 and another foo.c to /main/task002, they'll show up as different items because plastic tracks them independently.

This way of working is pretty good for most situations, but as you mention not as good for an scenario like yours.

But, in real life, it is hard to see a situation like that. The normal thing is that you add your code on the /main branch (for instance) and then you branch from there, and adding whole new trees on branches is perfectly doable, although it will be very rare that they'll collide.


Share this post

Link to post
Share on other sites

Well the interesting this was it happened rather easily while working with another guy.

We have a pattern that says

rootpath/ - all public headers

-> private - all private headers

-> source - all sourcefiles

because we are currently creating a software from scratch we worked both independently on two different features.

Feature one -> add a filesystem encapsulation mechanism

Feature two -> add a value factory mechanism

so we added in our framework under System


both independently the folder private.

User one on branch main/SCM1421 FileSystem

User two on branch main/SCM1444 DomValueFactories

Merging both back into main -> error.

I could only overcome this by renaming the folder private to private2, move the file, checkin, delete private2

And as far as i can tell from previous projects stuff like what happens rather often.

Yes it won't happen so often for files ... but directories are not source files

Share this post

Link to post
Share on other sites

We're working to improve this behavior on 4.0. Yes, it is not extremely common but it can happen, specially during project initiation phases.

Share this post

Link to post
Share on other sites

I know this is an old thread, but I just wanted to add that I commonly run into this issue and wish there was a way to merge evil twin directories that have different contents. 

I most often run into this when I am ramping up a remote unity contractor, say for instance an audio engineer, and I want them to be able to add their content in an isolated branch without needing them to sync the entire project contents. That in itself would be fine, however a lot of those cases there are a number of third party tools from the asset store that contractor may need. Importing those tools from the asset store to their branch often creates a number of the standard unity directories, plugins, gizmos, ect which of course are already in the core project and causes this merge issue down the line. 

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...