处理克隆应用程序的最佳方法? [英] Best approach for handling cloned applications?
问题描述
(1)大多数特性在除了图形,用户界面文本以外,还有一些小的功能增加/改变,可能会以较小的方式改变游戏玩法。
$ b (2)除了核心代码库和bug修复一样,应该只做一次,并且很容易合并到克隆中。
<3>克隆特定的功能不应该被允许(或者应该很难)被上游推入核心游戏代码库。例如,如果我在Sushi Wars中添加一个自己的滚动迷你游戏,Vegezone Wars代码库应该不受影响。
我的直觉是使用Git子树。我应该考虑的其他选择是什么?
* 我并没有真正与任何可能存在的称为水果战争的游戏相关联 另一种选择是在每个应用程序中声明一个核心
的git回购文件您的其他项目git回购为 子模块 strong>。
由于子模块可以设置为遵循分支 a>,一旦你在 core
中进行了修改,你需要在另一个项目中使用 core
来完成修改:
git submodule update --remote。
由于滚动
小游戏到 Sushi Wars
将被添加到 Sushi Wars
树中(但不在 Sushi_Wars / core
),核心
回购将永远不会知道该新功能。
Let's say I have a simple mobile game, Fruit Wars*. Players shoot oranges, apples, bananas, pineapples, etc at each other, collect points, level up, etc etc. It's doing well, and I'd now like to make similar titles - Vegetable Wars, Sushi Wars, Gluten-Free Vegan Kosher Wars, etc, all based on the same codebase of the classic Fruit Wars. What's the best strategy, using Git, for managing the codebase of these clones, keeping the following in mind:
(1) The majority of the features will be the same between clones, except for graphics, UI text, and maybe some minor feature additions/changes that possibly change the gameplay in minor ways.
(2) Additions to the "core" codebase, like bug fixes, should only be done once and easily merged into clones.
(3) Clone-specific functionality should not be allowed (or should be very difficult) to be pushed upstream into the "core" game codebase. For example, if I add a make your own roll minigame to Sushi Wars, the Vegetable Wars codebase should remain unaffected.
My instinct is to go with Git subtrees. What are the other options out there I should consider?
*I am not actually associated with any game that might exist called Fruit Wars
The other option is to declare a "core
" git repo within each of your other project git repo as a submodule.
Since a submodule can be set to follow a branch, once you have done a modification in core
, all you need to do in another project using core
is:
git submodule update --remote.
Since the roll
minigame to Sushi Wars
would be added in Sushi Wars
tree (but not in Sushi_Wars/core
), the core
repo would never be aware of that new feature.
这篇关于处理克隆应用程序的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!