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 324471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:07:37+00:00 2026-05-12T09:07:37+00:00

We previously used many submodules in our main repositories, but to increase the maintainability

  • 0

We previously used many submodules in our main repositories, but to increase the maintainability of our projects we started an experimental branch where we replaced them all with subtrees.

This worked good – but now when I’m trying to update one of the subtrees it erroneously merges the update into a completely wrong directory that isn’t even a subtree.

The main repository, where the branch “subtree” contains the experimental branch, is: git://github.com/hugowetterberg/goodold_drupal.git

The repository to merge in updates from: git://github.com/voxpelli/drupal-oembed.git

Merging by doing: git merge -s subtree oembed/master

The path the updates should be merged into: sites/all/modules/oembed/

The path they are merged into: modules/aggregator/translations/

Anyone having an idea of how to get the updates into the subtrees or what the error can be?

  • 1 1 Answer
  • 2 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-05-12T09:07:38+00:00Added an answer on May 12, 2026 at 9:07 am

    Unfortunately this is a bug (or missing feature) in the “git merge -s subtree” code. It actually guesses the subtrees that you want to merge. Usually, this magically turns out to be correct, but if your subtree contains a lot of changes (or was originally empty, or whatever), then it can fail spectacularly.

    The best way to work around it is:

    1. Merge the files as you did above.

    2. Manually move all the resulting files to where they should have gone.

    3. git commit -a --amend to correct the merge commit.

    Future merges will probably work fine, unless this directory is constantly in unbelievable amounts of flux.

    The experimental “git subtree” command has a --prefix parameter that should let you override this, but unfortunately it doesn’t work at the moment (since it requires working around “git merge -s subtree” features and there hasn’t been time to do it).

    Anyway, this should be a rare situation and the workaround won’t be needed even for future merges of the same project.

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

Sidebar

Related Questions

I'm an ASP.NET MVC newbie, but have used many Model-View-Controller frameworks previously. I recently
Previously I used IEnumerable<T> type, if I passed collection as parameter of method. But
I used this code previously in netbeans 6.9.1 but it does not seem to
My project has many reader and writer classes. I started implementing IDisposable, but I
I have previously used has_and_belongs_to_many associations in my older Rails apps but am moving
I'm looking into development standards fro JavaScript. I had previously used Doulgas Crockfords Javascript
Previously,I used the window.showModalDialog() function to popup a window: window.showModalDialog(myHtml) In myHtml,there are some
The only type of 'remote desktop' application I've used previously is VNC viewer. My
I'm just thinking about the styling and performance. Previously I used to write something
Previously, I used to use MFC collection classes such CArray and CMap . After

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.