What's best way to work with git on multiple master branch?

有些话、适合烂在心里 提交于 2019-12-06 13:39:08

问题


I have a git repo for my work project. The software is still under development but i have now three different branch "master" each with some little variations (graphical customization and different behaviour). I cannot merge automatically my development branch with these master branch, because every branch is differnet. I read about git cherry-pick but my question is: "is this the right way to work?" I really need this three different version of my project, maybe can i try to separate the "core" with the "customization" and works with git submoduele?

thanks


回答1:


You could use submodules if those variations can be isolated in their own subdirectory (since it is how submodules will be structured within your parent repository: see for instance "Planning repository layout for git migration").
That should be the case for the graphical variations.

If those variations are simple config files differences, you can also use one branch and content filter driver in order to generate the right config file, based on the environment in which the repo is checked out.

I prefer those options to cherry-picking, which can introduces:

  • duplication and functional dependencies,
  • functional dependencies


来源:https://stackoverflow.com/questions/13653272/whats-best-way-to-work-with-git-on-multiple-master-branch

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!