Marcus Warm Messages: 9 Registered: July 2009 Location: Kevelaer, Germany
we have to commit nearly all our changes in 2 (client specific) branches. Sometimes it's necessary to modify some (client specific) files for one branch before committing them.
What's the recommended way to do this? Cherry-Pick? Patch? Copy? ...
(With CVS we used the merge command and merged file by file. A lot of work.)
Eclipse Kepler 20130614-0229
EGit team provider 184.108.40.206306101825-r
[Eclipse Kepler 20130614-0229, EGit team provider 220.127.116.11306101825-r]
One obvious solution is to do the change in one branch and then cherry pick that commit into the second branch. Branch specific modifications could be done afterwards in separate commits in the two branches.
Depending on how your two branches differ and how much branch specific work has to be done I could also imagine a solution:
>> Sometimes it's necessary to modify some (client specific) files for one branch before committing them.
If you do it like that, you have no way of telling whether a given commit has been made on both branches or not, and you lose many of the benefits of a version control system.
Christian's suggestion is an good one. You might also want to think about how your code is structured. If you have code that is almost the same on both branches, but has client-specific parts, you need to separate the common and client-specific parts. How to do this depends on the language you are using, and the nature of your application, but your question suggests that the code and build architecture needs re-thinking.