Git recommendations for a project that has a single "Core" version and multiple offshoots for client customisations?
What recommendations for using Git do people have for a scenario where we have:
- 1 single "core system".
- From the core system we create offshoots for our clients, with customisations made for them.
- If a bug is found in the core system, it will get applied to the client-customised version.
- Some bug fixes 开发者_运维技巧will be tricky to apply, as the client-customised code can be heavily customised.
- Some bug fixes may be only relevant for a client's system.
- A clients system may also have extra work done to it later, if they wish to have extra features.
I've been experimenting using this technique http://dev.innovationfactory.eu/2010/06/09/development-and-release-strategy-with-git/ for a small 1 man project, but I fear we may run into trouble for multiple client versions.
I've outlined a possible strategy below, but I think we'll run into trouble. As although we can mark something as a release, our client versions will diverge too much and make it tricky to know what hotfix to apply where.
- /master
- /releases/[release name]
- /stories/[developer's initials]/[new feature name]
- /clients/[client name]/master
- /clients/[client name]/stories/[developer's initials]/[new feature name]
Of course, the answer is to refactor code so that client versions, don't alter code - but I don't have that luxury at the moment :-)
EDIT: Andrew has pointed out a good similar question, which I must have missed before. It doesn't have as much detail as my own question, contains sufficient detail and good answers. So i'll vote to close this question in favour of this one: How can I get track of several projects in Git that share common code?
Make branch for all clients. Patch update could work by cherry pick.
Must have doc for git: link.
精彩评论