1

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

IgnazioC
  • 3,442
  • 2
  • 26
  • 43
  • cherry-pick would work if your dev branch is clean (no modifications from the HEAD commit) or you could create a another branch and merge all the three branches to the new branch and then merge your dev branch to it. Learn more at http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging – Chipmunk Nov 30 '12 at 21:25

1 Answers1

2

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:

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283