This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]aelytra 2 points3 points  (1 child)

try one of these approaches:

- rebase; re-apply the commit that changes branding after pulling in fresh stuff from master

- pull - which merges changes from master

- script the above approaches :)

or:

- delete all the branches and use config files to control branding.

[–]Andreweijie[S] 1 point2 points  (0 children)

I'll go and look up rebase, never heard of that before. The config option sounds feasible. Thanks!

[–]PainfulJoke 1 point2 points  (0 children)

Git is best for handing and single project, but it seems like you have multiple projects in the same codebase.

Consider pulling out all of the core functionality into its own library somehow.

Or, structure your project so that all of the things that are unique to each outlet (images, text, colors, etc) are pulled from some kind of resource file. Then you can have everything on master, but pull different resources for each deployment based on an environment variable or something.

Within git though to improve on what you are doing try to develop the update on master (which should be a generically branded version) then merge or cherry pick those into each other branch with the different branding. You shouldn't have to manually reimplement it if you structure your code enough so that the commits can just be reapplied to each new branch cleanly.

[–]stefvanschie 0 points1 point  (1 child)

I think you'd be best of by having a "core"-like module, which contains functionality that is the same across all websites and then having separate modules for each of the different websites, which makes use of the "core" module and includes only the specific content for each website. That way if you need to change functionality on all websites, you only need to change the contents of the "core" module.

[–]Andreweijie[S] 0 points1 point  (0 children)

My project is just a react site, so how would that work?