Making SourceTree the default app on GitHub

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

This widget could not be displayed.

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.

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?

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.

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

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

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. ;)

This widget could not be displayed.

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.

 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

712 views 1 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you