Can I make my own "Checkout in SourceTree link"?

Hello, I manage Hg and Git repos at my organization. Is it possible for me to craft a link or button to "Checkout (repository) in SourceTree" like is available on BitBucket? I'd like to make this kind of link available for my users from our internal web page.

1 answer

1 accepted

Yes. The target of your link should use the sourcetree protocol with cloneRepo and the repo URL. For example, "sourcetree://cloneRepo/ssh://". Everything from "ssh" forward should be replaced with your repository's URL.

If you use bitbucket's "checkout in sourcetree" button in Google Chrome, the confirmation dialog shows you the whole link that it is attempting to launch.

Here is the relevant section from the 1.4 release notes:

  • Custom URL protocol support - SourceTree will now respond to URLs of the form "sourcetree://cloneRepo/<CLONE_URL>" so websites can expose clickable links to clone in SourceTree. Also SourceTree will optionally handle github-mac:// URLs if GitHub for Mac isn't installed (or if the user sets Preferences to prefer SourceTree).

Thanks, that is super helpful!

Is it possible to open sourcetree repository at a specified commit ?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
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 ...

787 views 0 4
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