• Icon: Bug Bug
    • Resolution: Tracked Elsewhere
    • Icon: Medium Medium
    • None
    • 1.8.0.2
    • None
    • None
    • Mac OSX 10.8.5
      Embedded Git 1.8.4.2
      System Git 1.8.3.4 (for command line uses)

      I can't add a new subtree or link to an existing subtree.

      The repositories are on Bitbucket (sorry I can't put a link to them, they're private. If it's necessary I can create fake repos).

      If I try to add a new subtree on a non-existing folder, Sourcetree asks for my password, I enter it, and later I get these errors:

      -------------------------------------------------------------------------------------

      git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree subtree add -P /Users/sergidiaz/Desarrollo/XXX-for-android/jni/Test https://sergidiaz@bitbucket.org/YYY/XXX-for-ios.git master

      2013-12-13 13:02:29.146 git-credential-sourcetree[8201:707] Error (internetKeychainItemForServer:withUsername:path:port:protocol - The specified item could not be found in the keychain.

      From https://bitbucket.org/YYY/XXX-for-ios

      • branch master -> FETCH_HEAD

      error: Invalid path '/Users/sergidiaz/Desarrollo/XXX-for-android/jni/Test/.gitignore'

      error: Invalid path '/Users/sergidiaz/Desarrollo/XXX-for-android/jni/Test/.gitmodules'

      error: Invalid path '/Users/sergidiaz/Desarrollo/XXX-for-android/jni/Test/3D Assets/Balon.FBX'

      error: Invalid path '/Users/sergidiaz/Desarrollo/XXX-for-android/jni/Test/3D Assets/CAMP.mesh'

      (More Invalid path errors, one for each file...)

      error: pathspec 'jni/Test' did not match any file(s) known to git.

      Completed with errors, see above

      -------------------------------------------------------------------------------------

      If I create the folder I simply get a "prefix already exists" error.

      If I create a subtree using the command line, following this guide from your own blog (http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/) and then I try to link to it, I get the same "prefix already exists" error.

            [SRCTREE-2000] Can't add or link a subtree

            Monique Khairuliana (Inactive) made changes -
            Workflow Original: JAC Bug Workflow v3 [ 3370993 ] New: SRCTREE JAC Bug Workflow [ 3737564 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: SourceTree Bug Workflow [ 589349 ] New: JAC Bug Workflow v3 [ 3370993 ]

            Thanks. (I'll wait for the update in SourceTree)

            joostfontein added a comment - Thanks. (I'll wait for the update in SourceTree)

            KieranA added a comment -

            Hey Joost,

            The associated issue for squash is SRCTREE-2024.

            To get subtree working on the command line you'll want to follow this guide: http://engineeredweb.com/blog/how-to-install-git-subtree/

            Cheers!

            KieranA added a comment - Hey Joost, The associated issue for squash is SRCTREE-2024 . To get subtree working on the command line you'll want to follow this guide: http://engineeredweb.com/blog/how-to-install-git-subtree/ Cheers!

            Hi Kieran,

            Can I track somewhere what the status is of feature request to add 'squash' commits on adding a subtree?

            For the meanwhile: How do I use commandline and include "--squash" in the command line? (I'm not into command line at all ...)

            • I clicked Terminal
            • Terminal went to correct directory
            • I entered:
              "git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree subtree pull -P dev3 --squash git@bitbucket.org:username/reponame.git master"
            • Terminal responded:
              git: 'subtree' is not a git command. See 'git --help'.
            • When I do git --version:
              1.8.0

            joostfontein added a comment - Hi Kieran, Can I track somewhere what the status is of feature request to add 'squash' commits on adding a subtree? For the meanwhile: How do I use commandline and include "--squash" in the command line? (I'm not into command line at all ...) I clicked Terminal Terminal went to correct directory I entered: "git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree subtree pull -P dev3 --squash git@bitbucket.org:username/reponame.git master" Terminal responded: git: 'subtree' is not a git command. See 'git --help'. When I do git --version: 1.8.0

            Case A: yes I used SourceTree. Tried again => same results.
            (Well ... case B works. So think that is fine for now).

            Case B:
            OK. That would be nice!

            joostfontein added a comment - Case A: yes I used SourceTree. Tried again => same results. (Well ... case B works. So think that is fine for now). Case B: OK. That would be nice!

            KieranA added a comment -

            Hey Joost,

            In case A, did you add the subtree using SourceTree? Are you sure it's named 'dev2'?

            As for case B, there's a feature request open to add 'squash' commits on adding a subtree.

            Cheers

            KieranA added a comment - Hey Joost, In case A, did you add the subtree using SourceTree? Are you sure it's named 'dev2'? As for case B, there's a feature request open to add 'squash' commits on adding a subtree. Cheers

            Case A
            After adding the subtree, I did a pull with this result:
            git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree subtree pull -P dev2 --squash git@bitbucket.org:XXXX/YYYY.git master
            From bitbucket.org:org:XXXX/YYYY

            • branch master -> FETCH_HEAD
              Can't squash-merge: 'dev2' was never added.
              Completed with errors, see above

            If I do a pull without squash commits, it does pull. However, all files appear in the root of the repo; not in dev2.. (Specifying the LocalRelativePath like dev2/, /dev2 or /dev2/ doesn't help)

            Case B
            Does work. However, when adding the subtree, it immediately does a pull. There is no option to ask for "squash commits", so it ends up with a complete list of commits..

            joostfontein added a comment - Case A After adding the subtree, I did a pull with this result: git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree subtree pull -P dev2 --squash git@bitbucket.org:XXXX/YYYY.git master From bitbucket.org:org:XXXX/YYYY branch master -> FETCH_HEAD Can't squash-merge: 'dev2' was never added. Completed with errors, see above If I do a pull without squash commits, it does pull. However, all files appear in the root of the repo; not in dev2.. (Specifying the LocalRelativePath like dev2/, /dev2 or /dev2/ doesn't help) Case B Does work. However, when adding the subtree, it immediately does a pull. There is no option to ask for "squash commits", so it ends up with a complete list of commits..
            KieranA made changes -
            Resolution New: Tracked Elsewhere [ 15 ]
            Status Original: Open [ 1 ] New: Closed [ 6 ]
            KieranA made changes -
            Link New: This issue is caused by SRCTREE-2033 [ SRCTREE-2033 ]

              Unassigned Unassigned
              4ebd4a7a51c7 Sergi Díaz
              Affected customers:
              1 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: