Вопрос

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?

Это было полезно?

Решение

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..

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top