简体   繁体   English

用git维护CrossPlatform源代码

[英]Maintaining CrossPlatform Source code with git

I am trying to learn git and , I need help in creating a new repo for my new game in unity. 我正在尝试学习git和,我需要帮助来为我的新游戏创建新的仓库。

I have developed a game on unity for which now I want to maintain a cross-platform specific code. 我已经开发了一个统一的游戏,现在我想维护一个跨平台的特定代码。 Since there will be specific code and features for android & iOS so what I was thinking to do is to keep my WebPlayerVersion of unity as a master repo and creating different branches for android & iOS so that I can add features on the respective branches without merging it with master. 由于会有针对Android和iOS的特定代码和功能,因此我想做的是保持WebPlayerVersion统一为主要仓库,并为Android和iOS创建不同的分支,以便我可以在各个分支上添加功能而无需合并与主人。

Now say If I change something in core gameplay on my master branch and I want it on my android & iOS branch then how do i tackle that 现在说,如果我在master分支上更改了核心游戏玩法,并且想要在android&iOS分支上进行修改,那我该如何解决

One thing I can do is everytime I change something on my master branch then I have to go and individually merge that code with some visual merge tool for respective branches but thinking at the bigger level its going to be difficult so is there any alternate way for this 我可以做的一件事是,每当我在主分支上更改某些内容时,我都必须去用各个分支的可视化合并工具分别合并该代码,但在更大的层次上认为这将很困难,因此是否有其他替代方法这个

Or any other good alternative solution with git for this particular scenario 或针对此特定方案的其他任何具有git的好的替代解决方案

If I change something in core gameplay on my master branch and I want it on my android & iOS branch then how do i tackle that 如果我在master分支上更改了核心游戏玩法,并且想要在android&iOS分支上进行更改,那么我该如何解决

Merge branches with ordinary merge or just changeset(s) with cherry-pick 以普通合并方式合并分支 ,或仅以樱桃选择方式合并变更集

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM