SourceTree

SourceTree for Mac 1.8 – Subtree Support & Mavericks Improvements

By on December 11, 2013

We’re happy to announce the release of SourceTree 1.8 for Mac. This release includes the much anticipated Subtree support and important Mavericks updates to improve stability.

 

Download SourceTree for free

 

Subtrees

Submodules were a feature of Git that many people had trouble working with and so subtrees were introduced as a way to solve many of the problems submodules introduced. We’re happy to announce that you can do all of this right from within SourceTree with a little zest added to make subtrees even easier to manage.

Subtree support in SourceTree

SourceTree stores subtree metadata so you can simply pull commits from your remote into your subtree without having to provide the same information over and over. Take a look at Atlassian’s blog “Alternatives To Git Submodule: Git Subtree” to find out more information about how to use Subtree with Git.

Mavericks Updates and Fixes

With a big thanks to the community we’ve been able to track down any outstanding compatibility issues with Mavericks. Version 1.8 of SourceTree includes a fix for the ‘error on commit’ issue, as well as startup crashes that a small number of users were experiencing.

Analytics

We want to make SourceTree an even better product for you, our users, and to do this we’d love your help in finding out how you use our product. In version 1.8 you’ll get a popup asking if it’s OK to gather some data about how you use the product. We want to emphasize that no personal data is taken whatsoever.

Other fixes / updates

 

Download SourceTree for free

 

Get SourceTree for Windows

Don’t forget, SourceTree is also on Windows too. Grab the latest version from sourcetreeapp.com!

44 Comments

  • Jason
    Posted December 11, 2013 at 6:22 am | Permalink

    I can’t seem to get the subtree feature working. Everytime I try to add, it keeps saying that master is not a valid commit. The source url is the ssh link to a bitbucket repo, branch/commit is set to master (it definately has this branch) and the path is set to a non-existant directory within the repo (tried both relative and absolute paths) as it complains when the directory (albeit empty) already exists. I have a repo with existing subtrees and can’t find a way to register these either. It seems like it just wants to add only.

    • Posted December 11, 2013 at 7:30 am | Permalink

      Hey Jason. What’s the exact error message that’s returned? As for existing subtrees, if you use the Add/Link option it will know it’s a non-empty directory and should create a link so it’s registered in SourceTree (this is why we named it Add/Link).

      Cheers

      • Jason
        Posted December 11, 2013 at 7:53 am | Permalink

        Hi Kieran

        The message I received was “‘master’ does not refer to a commit”

        I managed to get the existing link working with the existing subtree setup. I couldn’t use the file selector though as it kept providing an absolute path which failed. I had to manually type the relative path to the directory

        However, I still can’t “Add”.

        I tried running `git subtree add -P test_dir –squash git@bitbucket.org:fake/repo master` manually in the terminal and received the same error as I stated above so wonder if something has changed in git as I’ve used this before in git 1.7 (now running 1.8.4.3). However, In the output when trying to add in sourcetree, it runs the same command and produces the same error

        • Posted December 11, 2013 at 8:04 am | Permalink

          Looks like it’s related to this: http://stackoverflow.com/questions/16829401/adding-git-subtree-from-a-branch. Are you using embedded or system Git? Perhaps if you’re using system Git you’re using a slightly older version, or your subtree version is a bit older.

          Absolute paths should work fine. Is it located on a share/mounted volume?

          Cheers

          • Jason
            Posted December 11, 2013 at 8:13 am | Permalink

            Hi

            I’m using git 1.8.4.3 now, installed through homebrew and the path is in /Users/my_user/Site/website.com. No mounted volumes or network shares being used

            In the preferences in sourcetree, it does state I’m using the embedded git though.

            I retried adding the existing link and it always fails on the absolute path but works when manually typed as a relative path. Switching to system git and retrying the “Add” produces the same error

          • Posted December 11, 2013 at 8:31 am | Permalink

            Hey Jason,

            I’ve created an issue for you here: https://jira.atlassian.com/browse/SRCTREE-1988

            I’ve not been able to reproduce this as of yet by using a similar folder name. Absolute paths work fine in my case also. Could you comment on that issue? Is both your repository and the subtree repo you want to add located on the same drive? Could you add these to the issue in question?

            Thanks in advance!

          • Jason
            Posted December 11, 2013 at 8:40 am | Permalink

            Thank you.
            I will add a comment once I’m home from work. I use sourcetree on my personal mac too so I will give it another try on that system

          • Jason
            Posted December 16, 2013 at 1:28 am | Permalink

            Hi Kieran.

            It seems that my issue seems to be resolved in sourcetree 1.8.3. I did have the same issue on another mac but as of the 1.8.3 release, I can add subtree’s ok

          • Posted December 16, 2013 at 2:20 am | Permalink

            Great to hear Jason, thanks for the feedback!

          • Jason
            Posted December 11, 2013 at 8:34 am | Permalink

            Also, to point out on the link you sent. I’ve tried adding the repo url as a named remote but still has an issue. Sourcetree wouldn’t accept the name given to the remote repo (claimed it was not a valid repository). I had to re-use the full repo path to get the same error again.

            I tried the information using the command line version as well but received the same error that master is not a valid commit (although it did accept my named remote). It seems like I can’t add but I can pull and push from a subtree fine which is odd

  • Sergi Díaz
    Posted December 13, 2013 at 1:55 am | Permalink

    I’ve tried to use subtree but there’s no way it’ll work for me. First, I tried creating a subtree from Sourcetree, but I always got “Invalid path” errors. Later I created a subtree using git command line (following this guide: http://git-scm.com/book/en/Git-Tools-Subtree-Merging) and tried to link it on Sourcetree, but I always get the error that “the folder already exists” (of course it exists, duh, it’s an existnig subtree). I’m using two simple repositories from bitbucket, there’s nothing special about them.

  • B
    Posted December 13, 2013 at 12:35 pm | Permalink

    Allow git subtree –squash

  • B
    Posted December 13, 2013 at 12:36 pm | Permalink

    Allows report invalid prefix if a the subtree was created from the command line

  • Aiman Zidan
    Posted December 30, 2013 at 9:05 am | Permalink

    for God’s sake implement a silent auto update feature please. I’m so tired of updating the app every week

  • Phil
    Posted December 30, 2013 at 11:43 am | Permalink

    Is Subtree support coming to SourceTree for Windows as well?

    • Anonymous
      Posted January 2, 2014 at 2:40 am | Permalink

      Yes, this is earmarked for 1.5.

  • Anonymous
    Posted January 6, 2014 at 12:28 pm | Permalink

    I’ve a problem with move tag. I’ve always this error : “hint: Updates were rejected because the tag already exists in the remote.”
    I use SourceTree 1.8.0.3 (Mac version) on Mavericks 10.9.1
    There is anything I can do for this error ?
    Thx

    • Anonymous
      Posted January 7, 2014 at 1:57 am | Permalink

      Moving an already pushed tag can cause confusion but if you want to do it, delete the tag from the sidebar and check the box to delete the tag on all remotes too. Then you can re-create the tag in the new location and push it.

      • Anonymous
        Posted January 7, 2014 at 5:02 am | Permalink

        With 1.7.x version I could move the tag without delete from sidebar and then recreate the tag in the new location.
        Do you know where I can download a previous version ?

        • Anonymous
          Posted January 10, 2014 at 3:19 pm | Permalink

          By the way, I’ve found the 1.7.4.1 dmg file and it works again without any problems.
          For me it’s a regression… badly…

          • Anonymous
            Posted January 13, 2014 at 1:49 am | Permalink

            This hasn’t changed between versions. Yes, you can move the tag just by re-tagging and checking the ‘Move existing tag’ option in the Advanced settings. That’s the same in 1.8. The issue comes when you pushed that tag already to a remote, so you’ll get an error at push (not at tagging). I think when you retested this on 1.7 you only did the moving of the tag (which always works).

          • Anonymous
            Posted January 13, 2014 at 1:54 am | Permalink

            Nope, when I tried on 1.7 the tag was already pushed on remote.

          • Anonymous
            Posted January 13, 2014 at 1:56 am | Permalink

            Doesn’t make sense – the validation of moving pushed tags is done by git anyway. If you can reproduce it please log a bug here with full repro details: https://jira.atlassian.com

          • Anonymous
            Posted January 14, 2014 at 5:19 am | Permalink
  • wu jihong
    Posted January 11, 2014 at 9:47 pm | Permalink

    Hi guys i add a Subtree use “Add/Link Subtree…” and it’s oK , But Subtrees menu still Empty( can’t use subtree push…,pull) 🙁

  • J. Kurian
    Posted January 28, 2014 at 6:17 pm | Permalink

    I’m using SourceTree 1.8.0.3 with a git-svn repo on OS X 10.9.1 with Xcode tools 5.0.2 (using system git version 1.8.3.4), and this is the error I’m getting when I try to create a local branch tracking a remote branch:

    git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree checkout -b http --track http

    fatal: Cannot setup tracking information; starting point 'http' is not a branch.

    Completed with errors, see above

    Any ideas? Thanks in advance!

  • Chris Townsend
    Posted March 4, 2014 at 7:46 pm | Permalink

    I’m interested in using the new subtree support in Sourcetree. I do my development on Mac and Windows, so I want to make sure that I won’t run into any problems because the Windows version of Sourcetree does not currently support subtrees. My understanding is that I can use Sourcetree on the Mac to do all my subtree setup and pull/push requests, and then on Windows Sourcetree will just access the repo like normal, including the subtree files.

    Is that correct?

    • Posted March 4, 2014 at 11:35 pm | Permalink

      Hey Chris,

      Yes this is correct, technically, however the persistent subtree settings stored in the sourcetreeconfig can’t be carried across Mac and Windows so the subtrees will need to be ‘linked’ (easy to do) when we introduce subtrees on Windows in the next version.

      Cheers

      • Chris Townsend
        Posted March 7, 2014 at 11:09 am | Permalink

        Thanks. Also is there a way to squash commits when you add the subtree? I see how to do it for individual pulls, but not for the add.

        • Posted March 7, 2014 at 11:32 pm | Permalink

          Hey Chris,

          We have open requests for this on JIRA and I should add it to the Mac version in the near future as squashing when adding will be available on the Windows version from the start.

          Cheers

          • Steve Crickett
            Posted March 18, 2014 at 2:27 am | Permalink

            Do you have a release date scheduled for 1.5 for Windows? I read somewhere it was Q1 2014, so sometime soon hopefully.

          • Posted March 18, 2014 at 2:37 am | Permalink

            Hey Steve,

            Yeah, very soon. We’re just running a beta phase so we should deploy soon provided everything goes OK.

            Cheers

  • Josh Taylor
    Posted March 10, 2014 at 7:10 pm | Permalink

    Since this update, we are getting the error when doing a pull through Sourcetree:

    error: Your local changes to the following files would be overwritten by merge:
    somefile.html
    Please, commit your changes or stash them before you can merge.
    Aborting

    When the file hasn’t been touched. Doing a normal pull through CLI works fine though. Has anyone noticed similar?

    • Posted March 11, 2014 at 3:24 am | Permalink

      Hi Josh,

      Git thinks there is a change to a file locally that would be changed by a pull (which is technically a merge, as it fetches and merges the changes). Check your working copy filters in SourceTree would show all files that could have changed made to them, and if in doubt, call ‘git status’ at the terminal once browsed to your repository location.

      Cheers

  • Justin
    Posted August 13, 2014 at 8:00 pm | Permalink

    I added a subtree from the command line, and it is not showing up in SourceTree. I also added a couple of subtrees to my subtree repo, and it is not picking those up either. However, it is picking up all of the associated remotes. Is there a way to refresh this?

    • Posted August 14, 2014 at 4:32 am | Permalink

      Hey Justin,

      This is a pretty common thing users are doing. When you add a subtree in Git, zero metadata is stored against that subtree. SourceTree actually does this for you, but only if you did it within SourceTree initially. Subtrees were designed to not store metadata as many problems came with doing this.

      What you can do is create a subtree from the sidebar specifying the same path / remote / branch from within SourceTree and it will offer you to create a link, which is just metadata, as it’ll recognise a folder already exists.

      HTH

      • Justin
        Posted August 15, 2014 at 8:36 pm | Permalink

        Thanks for the quick response, Kieran.

        I tried that, but it failed with this message:

        git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree subtree add -P /local/path/to/subtree/that/existed/before/trying/this/in/sourcetree/gui –squash ssh.url.here master

        prefix ‘/Users/justin/dev/iOS/personal/apps/TrackCoach/externals’ already exists.

        Completed with errors, see above

        • Posted August 15, 2014 at 11:11 pm | Permalink

          Hey Justin,

          Ah yes, the prefix needs to be a relative path (I think the dialog literally says “Local relative path”) rather than the absolute path otherwise this happens. That path is starting with a forward slash so is absolute, although understandably may not be the actual path.

          I’ve got an open issue to help users a bit more, detecting if they’re using an absolute path rather than a relative one.

          If that’s not the issue, could you open an issue on jira.atlassian.com so I can take a look in further detail?

          Thanks!

          • Justin
            Posted August 16, 2014 at 7:24 am | Permalink

            Well, I clicked on the button that lets you select the path manually, and that is what auto-populated. I’ll try again with only the relative path and see what happens.