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

1 vote
Accepted answer

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
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,110 views 4 2
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