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

  • SEARCH
  • Home
  • 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 7783361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:48:59+00:00 2026-06-01T19:48:59+00:00

I am developing a website in Drupal, and my development directory tree is as

  • 0

I am developing a website in Drupal, and my development directory tree is as follows:

modules
    -->moduleA
        -->moduleA.inc
        -->moduleA.info
        -->moduleA.php
    -->moduleB
        -->moduleB.inc
        -->moduleB.info
        -->moduleB.php
themes
    -->themeA
        -->themeA.info
        -->page.tpl.php
    -->themeB
        -->themeB.info
        -->page.tpl.php
ShellScripts
    -->scriptA.sh
    -->scriptB.sh
legacyPerlScripts
    -->script1.pl
    -->script2.pl

There is no large development team; I am developing all the modules and themes myself. The modules and themes are somewhat independent, and each has its own version number. However, some large tasks may require an upgrade to several modules. Furthermore, the modules, themes, and scripts should be deployed together, e.g. it would not be a good idea to use the current version of module A with an older version of module B, since module B may depend on a new feature in module A.

What is the best practice for using git for revision control? The options as I see them are:

  1. Put everything in one large, monolithic repository.
  2. Create a separate repository for each module, theme and script directory.
  3. Use git-slave (gits) to create subprojects for each module, theme, and script directory.
  4. Use git submodules
  5. Use git subtrees

Which of these 5 options is the most common for a web development project such as this?

  • 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-01T19:49:00+00:00Added an answer on June 1, 2026 at 7:49 pm

    Submodules are a bad solution for tightly coupled code. We had two main projects that shared a subproject for database migrations that both projects depended on. We implemented this with submodules, and the steps for making changes to the migrations were something like this:

    1. Commit the changes to the submodule.
    2. Push the changes to origin.
    3. Back up to the superproject that you were currently in.
    4. Commit and push the new submodule ref.
    5. Move to the other superproject’s copy of the submodule.
    6. Pull the latest changes from origin.
    7. Back up to that superproject.
    8. Commit and push the new submodule ref.

    On top of that, you always needed to make sure you were on the correct branch for all three projects. It was a huge pain. Submodules just weren’t made for that sort of development. We ended up making the database migrations part of one of the two main projects, and the code just isn’t shared anymore (it was only really shared as a convenience anyway).

    I did look into subtree merging, but it only looked marginally better than submodules.

    It really sounds like you should just leave it as one repository and use branching and tagging to manage the different versions of your various modules, especially if this is all to be deployed together anyway.

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

Sidebar

Related Questions

I'm developing a website in PHP and I'd like to give the user to
I'm currently developing a website which stores bookmarks in a MySQL database using PHP
I'm developing a website in Drupal 6. I've 3 blocks (I use as footers),
I'm developing a website who uses an external Drupal for the articles and pages.
I'm developing a website who uses an external Drupal for the articles and pages.
I am developing a website utilizing PHP, MYSQL and jquery. In one particular form,
I'm developing a website, and want to create a directory after the user username,
I am developing website with PHP Yii Framework and I am now stack, I
Do you use Subversion while developing a website with drupal ? I'm not talking
I'm developing website where user submit credentials using ajax,php and using POST method and

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.