在不同分支上保留Pro和Lite版本 [英] Keeping Pro and Lite Version on Different Branches
问题描述
我有一个专业版和应用程序的精简版,它们具有几乎相同的代码库。区别在于lite版本在各种视图控制器以及应用程序购买中都有广告。我的每个版本都在Git的自己的分支上,当前的版本是主分支。
我已经本地化了pro版本,将所有字符串切换到NSLocalized字符串,添加了本地化文件等。我想知道什么是将这些更改合并到lite版本的最佳方式覆盖两者之间的差异。当我在Xcode中打开merge into ...会话时,它会自动覆盖差异。
有没有办法在合并中跳过一段代码?
可能没有解决方案为此,但在我手动完成之前,我只想检查一下。
这不是一个git问题,而是一个项目结构问题。你不应该试图滥用git分支来达到这个目的。相反,您应该使用Xcode的项目/工作区设施(或框架)来组织代码本身,以便它可以在两个目标之间共享。
I have a pro version and a lite version of the app that have nearly identical codebases. The difference being that the lite version has ads in various view controllers as well as in app purchases. I have each version on its own branch in Git with the lite version being the master branch currently.
I have localized the pro version, switched all strings to NSLocalized string, added localization files etc. I am wondering what the best way to merge these changes into the lite version without overwriting the differences between the two. When I open a "merge into..." session in Xcode, it automatically would overwrite the differences.
Is there a way to skip a block of code in a merge?
There may not be a solution for this but before I do it manually, I just wanted to check.
It's not a git problem but a project structure problem. You should never have tried to misuse git branches for this purpose to start with. Instead, you should have used Xcode's project / workspace facilities (or a framework) to organize the code itself so that it could be shared between two targets.
这篇关于在不同分支上保留Pro和Lite版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!