SourceTree for Mac 1.8 – Subtree Support & Mavericks Improvements
By Kieran Senior on December 11, 2013We’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.
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.
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
- Upgraded the embedded Git version from 1.7.11 to 1.8.4.2
- Bookmarks window resize bug fixed when making the window too small
- Now detects the existence of GPG when setting it in SourceTree preferences
- Can now use your system Mercurial
- Visual improvement, patch sheet has had borders added it to it
- Selecting ‘lightweight tag’ now disabled the message text input
- The create pull request dialog is now skipped under certain circumstances
Get SourceTree for Windows
Don’t forget, SourceTree is also on Windows too. Grab the latest version from sourcetreeapp.com!
44 Comments
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.
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
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
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
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
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!
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
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
Great to hear Jason, thanks for the feedback!
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
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.
Hey Sergi,
Could you log this for us on jira.atlassian.com (project SRCTREE)? It’ll flag up on my e-mail so I’ll attend to it straight away. If you could include as much detail as possible that’d be great.
Thanks in advance
Ok, done. I’ve tried using the atlassian blog guide on subtrees (http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/) to no avail, I get the same results.
Allow git subtree –squash
Allows report invalid prefix if a the subtree was created from the command line
for God’s sake implement a silent auto update feature please. I’m so tired of updating the app every week
Is Subtree support coming to SourceTree for Windows as well?
Yes, this is earmarked for 1.5.
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
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.
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 ?
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…
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).
Nope, when I tried on 1.7 the tag was already pushed on remote.
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
Thx, done : https://jira.atlassian.com/browse/SRCTREE-2049
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) 🙁
i found the https://jira.atlassian.com/browse/SRCTREE-2006 , fllow the step close application ,and retry add Subtree ,it’s ok then . Thanks
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:
fatal: Cannot setup tracking information; starting point 'http' is not a branch.
Completed with errors, see above
Any ideas? Thanks in advance!
Hey there!
I’ve filed a bug for you here as it looks like a bug in a more recent version of Git: https://jira.atlassian.com/browse/SRCTREE-2075
Cheers
Thanks again!
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?
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
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.
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
Do you have a release date scheduled for 1.5 for Windows? I read somewhere it was Q1 2014, so sometime soon hopefully.
Hey Steve,
Yeah, very soon. We’re just running a beta phase so we should deploy soon provided everything goes OK.
Cheers
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?
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
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?
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
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
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!
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.