Making SourceTree the default app on GitHub

Kenneth Snyder
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 11, 2012

When I choose "close in Mac" on GitHub it defaults to GitBox as the application to handle that. How can I change that to SourceTree?

3 answers

1 vote
mohamed irshad
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 5, 2016

You can easily do it.

  1. Delete all git management software except source tree
  2. update to latest source tree
  3. Done. when u click on "Open in desktop" on github, it should automatically take you to source tree.

 

1 vote
fbricker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 25, 2015
1 vote
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2012

This isn't something you can do, an application has to register itself to handle custom URL schemes like this.

It appears Gitbox must have registered itself for the github-mac:// URL form. I'm not sure if that's considered good practice or not to basically take over someone else's URL handler, given that people might reasonably assume that that button is supposed to open the GitHub for Mac client. I could happily make SourceTree handle this URL form too, but I think the user should have control over which application this goes to if they have more than one installed, and I'm not sure how they do that easily. It appears that http://www.rubicode.com/Software/RCDefaultApp/ is one way to handle it, but it would be nicer if there was a way that didn't require extra software.

Kenneth Snyder
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 12, 2012

Thanks Steve. I did end up downloading the Rubicode software and it does what it says on the tin. I agree it seems something that should be handled at the OS level though.

Now that said, now that I've associated SourceTree to he URL handler the application itself doesn't take the parameter (aka, the repository I'm interested in cloning). Admittedly I don't NEED this functionality but I'm aflicted with an extremely enflamed case of laziness and would like to sooth the rash with a single click appaoch. Interestingly, neither did GitHub (although it was quite happy to beg for the right to have the association).

Anyway, is this something reasonable to add to add to the roadmap? Is there a way to "hack it" into working? Is it a dream worth giving up on?

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2012

Yeah, a little bit of code is needed on the SourceTree end to make this work. Supporting it is actually trivial, I could probably bash the code out in about 15 minutes - my main concern is whether it would annoy people to take this over. It's not something that's particularly easy to turn on/off dynamically inside SourceTree once it's in (it's advertised in the app's Info.plist), it really does have to be done by the user via that RCDefaultApp.

I'd quite like some other views on this - feel free to raise it as a feature request at https://jira.atlassian.com and encourage anyone else who might be interested in it to comment / vote. If it seems like it will be welcome rather than annoying, I'm happy to add it.

jhgorse
Contributor
April 9, 2013

Steve,

I would love to see this GitHub capability added to SourceTree. If there is a JIRA issue, I would be glad to vote it up.

In particular, I am interested in the git-flow-avh et al. workflows on GitHub, BitBucket, etc. using SourceTree.

Cheers,
Joe

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 9, 2013

It's a bit difficult to re-instate the GitHub client's own URL hook if we overwrite it in Windows, that's why I haven't implemented an option to allow github-windows: URLs to be handled by SourceTree yet (it's toggleable on Mac because restoring the settings is easy). That said, I'm not sure if their own client would restore them if it found they were pointing somewhere else. I've logged this here: https://jira.atlassian.com/browse/SRCTREEWIN-449

jhgorse
Contributor
April 10, 2013

I am currently on Mac. I have voted for the Windows feature on JIRA because the Win users need all the help they can get. ;)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events