How can I Make Use of Custom Scheme for URI Links?

I am very impressed by Sourcetree's ability to seemingly create its own custom URI scheme of "sourcetree://clonerepo..." and I was wondering if there was a way for me to make use of that feature in my own applications.

I recreated the link in both Firefox and Chrome and realized that there was no javascript used to cause a local instance of Sourcetree to open. However, when I tried to make my own scheme, it, naturally, was unrecognized. This led me to believe that during the installation of Sourcetree, there must have been some method that added the "sourcetree://" scheme to a whitelist of sorts in Chrome and Firefox to allow it to function as it does.

If anyone could point me in the right direction on this, I will be very grateful!

Thanks!

1 answer

1 accepted

2 votes
Timothy Chin Community Champion Jun 11, 2014

By right, one would be creating a custom uri for an application (http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx) as defined here. As long as the client has this in it's registry (e.g. HKEY_CLASSES_ROOT\sourcetree\shell\open\command), the client machine should recognize "sourcetree://".

Not sure what you are trying to do.

This is perfect! Thank you very much! It was very rewarding to be able to create my own scheme.

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

262 views 0 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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot