We had a very unique situation in that we were integrating one Sitecore instance into another, where items between the two instances shared the same guid. In other words, both sites shared the same exact Sitecore starting point. Media library folders, content asset folders, etc., all have the same item guids between Sitecore instances. Integrating one instance into another wasn’t as simple as it first appeared, we couldn’t simple drop one into the other and expect it to work without any issues. In test runs, we experienced errors due to conflicts in these areas on item creation. We were using Unicorn to serialize to disk form one instance and deserialize back into the other.
To get past these commonalities between item ids, the following script was used to eliminate these conflicts by generating new items and moving content over to the newly generated items:
Create the new item with a temp name
Update field values
Move all child items to the new item
Rename the original item
Rename the new item to the original name
Note that this script does not accommodate for moving of referrers of the original item to the new one. A separate process was used to resolve those issue before removing the original items.