Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-1621

subtree pulls drop files in the root of the parent repository



    • Type: Bug
    • Status: Needs Verification (View Workflow)
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 1.5.1, 3.0.15
    • Fix Version/s: None
    • Component/s: General, Git
    • Labels:
    • Environment:

      Windows 7 x64 / SourceTree v1.5.1 / Embedded Git v1.8.3

    • Last commented by user?:
    • Symptom Severity:


      I'm encountering an issue where new files pulled from a subtree are being placed in the root of the repository, rather than the local relative path as specified in the Add / Link SubTree dialog.

      If I move these files to their proper location, and pull changes, the files are updated in the correct location.

      This may be related to this discussion on stackoverflow; http://stackoverflow.com/questions/1306595/git-confused-when-merging-an-update-into-my-subtree.

      From the accepted answer

      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 folder was originally empty, but subsequent pulls that contain new files still drop those new files in the root.

      The paths I have been using;

      Shared code repo is at

      \\DISCOMBOBULATOR\Repository\Visual Studio\Common\TAA Interfaces

      Main repo is at

      \\DISCOMBOBULATOR\Repository\Visual Studio\biotools

      Initial setup for Local Relative path when defining the subtree is

      \\DISCOMBOBULATOR\Repository\Visual Studio\biotools\Common\TAA Interfaces

      When when viewed after saved is recorded as

      Common\TAA Interfaces.

      More discussion at https://answers.atlassian.com/questions/282022/subtree-pull-hangs-or-pulls-into-the-wrong-folder




            • Votes:
              4 Vote for this issue
              8 Start watching this issue


              • Created:
                Last commented:
                13 hours, 26 minutes ago