Unity provides a tool for merging scene and prefab files called Unity YAMLMerge.
Recommended Reading: