Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8561189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:26:49+00:00 2026-06-11T16:26:49+00:00

So we have our template_site This is basically the front end base for any

  • 0

So we have our template_site

This is basically the front end base for any sites we build.

we have our cms

This is the backend for the sites and resides in template_site/cms but is in it’s own repository as we often use it without the template_site as well

We have our modules which have files that reside in

template_site/(all over the place) and cms/modules/(name of module)

Essentially what we want is to have
The cms in it’s own repo,
The template_site in it’s own repo.
and then for every module we create have that as a branch off another repository. cms_modules but we only want that repository to contain the files and changes to files specific to the module, so that we can pull a module into an existing project and have it only affect those files.

The issue is that basically all sections are linked, but we want to be able to while working on a module pull in any changes to the template_site, and also pull in any changes to the cms

Reason for this setup is that, for each site we create we want to clone the template_site into it’s own repository and then we can customize it as needed.

How can we do this?

Or is there a better workflow for this sort of setup?

What I can see as the appropriate setup for this would be:

Have the cms_modules repo as the “super project”
Have the master branch have no modules in it.
Add cms as a submodule
Add template_site as a submodule

That way we can clone the cms_modules repo into it’s own repository and work off that and only init the template_site submodule if we need it.
But the only issue I can see here is We would want the cms_modules copy (for new sites) or branch (for new modules) to track any new files at it’s root, but also track any changes or new files inside the sub modules instead of having their respective repositories track them.

Then if there is an update to the template_site or cms repositories we can just cd into their respective directories and issue the updates, but again we would want the merges for any files we have changed to be tracked into the cms_modules repo not the respective submodule.

And if we want to add another module we can just merge in the branch for that module.

How could we set that up?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:26:50+00:00Added an answer on June 11, 2026 at 4:26 pm

    Repo structure: git submodules seems to be best-designed for situations in which you are using an external repository not under your control. The idea is that you are transplanting a different repository within your current repository, but part of the trick is that the state of a branch in the outer repository will contain a commit hash of the ‘current version’ of the submodule. In other words, the outer tree won’t show progress in the inner tree without an additional commit to the outer tree. This makes a lot of sense for the external case–I don’t want my build to be broken due to development in a library I use–but seems like a lot of bookkeeping in your case.

    A more intuitive use of submodules would be if you were to create a whole new repository per site, and then have cms be a proper submodule of that. In that way, each site could interact with a different snapshot of the CMS folder, and you only push out a new version when you’re ready.

    Repository count: Because your data is actually under your control, it makes the most sense to me to have one repository. You could make a good argument for separate repositories if, for instance, one of the directories were large enough (in megabytes) or if a subset of your coworkers should only have access to one or the other, but otherwise, there’s little advantage to keeping the repository parts separate.

    Branch per module: I tend to agree with the Stack Overflow answer here that recommends against putting entirely different content in each branch. In that condition, unless you create merge commits automatically or frequently, there will be no single branch that contains multiple modules (or all of your modules). There’s nothing in git that prevents it from working that way, but it’s atypical.

    My preferred branch structure: Create a master branch that contains all modules and all sites. You can still create a branch per module or site to ease development, but once the code looks good, merge the branch into the master. Haven’t touched a module in a while? Delete the branch–you can always recreate it later.

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have our large build broken into many build files with a master build
So we have our J2EE application using Log4j like this public class CustomerController {
We need to have our apps be translated into other languages. This entails renaming
Requirement is this ... We have our 3 web-applications deployed in RHEL-5 server, we
We want to upgrade our build servers to run our typemock tests, but I'm
We have our own custom calendar in our portal which is developed in Java.
We have our own media player built in Javascript and I was wondering if
We have our own data streaming algorithm that include some metadata+records+fields values. Currently we
We (small team) currently have our Visual Studio projects on a network drive (no
I would like to have our web applications pull static content (css, js, images)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.