[英]Release/Build/Branching Management with Git (Version Control)
I've ran into a common problem that I don't know how to properly solve. 我遇到了一个我不知道如何正确解决的常见问题。 I do have a
dev branch
in which I've merging all of the branches ( feature/hotfix
) that are done, but suddenly, they want to release a specific feature or just to release the hotfixes only. 我确实有一个
dev branch
,其中已经合并了所有完成的分支( feature/hotfix
),但是突然之间,他们想要发布特定功能或仅发布修补程序。 How can I properly/orgnanize merge dev
to master
without including the feature/hotfix
that they don't want if I've already merge it to the dev
? 如果我已经将其合并到
dev
如何在不包括他们不想要的feature/hotfix
情况下正确/组织合并dev
使其master
?
One solution that I've been thinking of is branching out from dev
then exclude all the things they don't want, then release it on production, but I will not merge it to master
. 我一直在想的一种解决方案是从
dev
分支出来,然后排除他们不需要的所有东西,然后在生产中发布它,但是我不会将其合并到master
。 Then after they've accepted all of the features
or hotfixes
on the dev
, that's only the time I will merge to master
, and I will just simply ignore/delete the branch out from dev
(which is the branch that have excluded the feature they don't want) that I've made. 他们已经接受了所有的再经过
features
或hotfixes
的dev
,这是唯一的一次,我将合并到master
,我将只是简单地忽略/从出删除分支dev
(这是已经排除了该功能的分支,他们不想),我做了。
Second Solution that I've been thinking is releasing an apk per feature or hotfix, but I don't think the testers will like to hold many apks on their phone with specific feature each. 我一直在考虑的第二个解决方案是按功能或修复程序发布apk,但我认为测试人员不希望在手机上保留许多具有特定功能的apk。 But with that, I can surely merge feature or hotfix that is accepted to
dev
because they mark it to be included on the next release. 但是有了它,我肯定可以合并
dev
接受的功能或修补程序,因为它们将其标记为包含在下一发行版中。
Any other solutions or suggestions on how I manage branching? 关于如何管理分支的其他解决方案或建议?
Solution 1 is more reasonable. 解决方案1更合理。
Since the dev
branch already contains merged features and hotfixes, you should exclude some features/hotfixes which are not required for release from dev
branch (or branch created from dev
). 由于
dev
分支已包含合并的功能和修补程序,因此应排除从dev
分支(或从dev
创建的分支)发布不需要的某些功能/修补程序。
But one thing for reminder, since you treat the branch from dev
as production branch (instead of master
branch), please make sure changes from master
branch are included in the branch from dev
. 但请注意,由于将
dev
的分支视为生产分支(而不是master
分支),因此请确保dev
分支中包括master
分支的更改。
Besides, .apk
files are output files from your source code, it's unnecessary to manage the .apk
files in your git repo. 此外,
.apk
文件是源代码的输出文件,无需在git repo中管理.apk
文件。
And you can find more files which need to be ignored in this .gitignore file. 您可以在此.gitignore文件中找到更多需要忽略的文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.