Proper organization of the project with multiple realms

Hello. Please tell me how to properly organize the structure of the project. For example, there is a server 3.3.5 with two realms x1 and Fun. How would it be better to maintain a git repository for development and what server structure to use, so that, for example, there are two worlds that use common map files and an authentication server? As in this case it was more correct to compile the project. Is there any point in making different git branches for each realm?