Reputation: 2904
I am trying to decide the best way to organize my projects in source control. They share the same code but they do not and cannot share the same binary assemblies. In addition, even though the code itself is nearly 98% identical there are various minor differences due to each platform. The current project is built for 4 platforms.
I use Git as my source control, I tried using multiple branches but it became a nuisance when I worked on branch 1, and wanted to take those changes over to branch 2, since the code is close but not identical I couldn't do a merge, I need to manually copy the code over and tweak it.
So my current solution is separate repositories for each platform. Any thoughts on how this can be improved?
Upvotes: 1
Views: 195
Reputation: 34571
The usual way to maintain a multi-platform application is to have one codebase that can be built for any supported platform, using things like #if
to enable and disable platform-specific portions as appropriate. You definitely don't want to maintain them as separate branches and have to copy every change to all of them.
Upvotes: 1
Reputation: 1328152
If the differences are really small in term of number of files, it would be best to:
Upvotes: 0