0

I'm working on an Android project which has several skins/graphics packs. I have created several folders of assets which are named identically, but are different graphics (for different brands).

Initially I thought that I could create a main project which includes all source code, and then just create a subtree for each brand, containing the different assets. I have had issues though, adding the subtree to the original project.

How should I setup a working git main project and different assets subtrees?

approxiblue
  • 6,982
  • 16
  • 51
  • 59
user1654794
  • 225
  • 4
  • 10
  • How about having a different directory name for each skin, but create a link to it under your fixed name> Every time you want to change skin, you'd just relink that directory. Nothing to do with git at all. – Shahbaz Jan 21 '14 at 15:29
  • This does not sound like a good case for using subtrees, they carry a fair amount of complexity. Are you sure you have checked the benefits and drawbacks of using subtrees? If so you could improve the question by adding what have you tried, how it failed, how you plan to use the subtrees or what is your intention in setting it this way. – Maic López Sáenz Jan 21 '14 at 20:39

1 Answers1

0

Like others have said, you should provide more details on your configuration and your goals.

Sticking with the git-subtree solution (assuming it's indeed a good solution, and I can't say for sure), you can try creating only one external repo, containing ALL your assets, and include that as the only subtree in the main project. Having only one subtree keeps the complexity down, and you can keep your skins history separated. In the end it's likely that, when you have to change an asset, you have to do for all the skins, or you end up with inconsistencies in your layout. For this reason having a separate repo for every skin is overkill IMO.

Additional tip: if you're working on a Mac (I hope you do so ;) you can give a try to Atlassian SourceTree, a free git GUI client that recently introduced support for git-subtree. I don't like GUIs very much, but I found this one very handy when managing complex subtrees setup.. There's also a Win version, but it doesn't contain subtree support yet (it will soon).

Hope this helps..

nexbit
  • 224
  • 2
  • 4