1

I'm starting to learn git branching, and I'm developing with other people a web based MVC project (using Zend).

We just worked on the master branch since today; now we need to develop tow different views (html aspect, css & co.), so we created a branch, let's call it newview.

Obviously we keep developing models and controllers, which have to be the same for the two branches.

In a few days from now, we'd like to merge the code changes from models and controllers from the branch master to the branch newview.

So the question is: how to merge only the models and controllers code from branch master to branch newview without overwriting/merging the code for the view (which have to remain separate)?

Lorenzo Marcon
  • 8,029
  • 5
  • 38
  • 63

1 Answers1

1

I think you are looking for subtree merges:

http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html

The free online Pro Git Book has a chapter on Subtree Merging

sehe
  • 374,641
  • 47
  • 450
  • 633