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

This widget could not be displayed.

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

870 views 2 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