My team is working on a Unity project with a large 3rd party SDK. There is a new preview SDK that allows us to target a new device that only two of us have access to. I created a new branch 'new_sdk' and integrated that SDK there and got it working with the new device.
Now moving forward I want to keep the original branch with the old SDK and the new_sdk branch for the new SDK, but otherwise merge changes outside of the SDK between the branches. Other developers on the team only have access to the old device so we really have to do this.
One solution is to exclude the library folders from source control via .gitignore and then manually copy them over when you want to switch branches. But that isn't nice.
I started looking into .gitattributes and merge drivers from this article: https://medium.com/@porteneuve/how-to-make-git-preserve-specific-files-while-merging-18c92343826b#.m58m7t1qp But it seems complicated and I couldn't get it to work when I followed the steps in the article on a test repository.
Is there a way to make merge drivers work and do what I want?
Is there a better approach?