Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set Sourcetree as the default git client on MacOS

Xirion11
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 25, 2023

I used to only use Fork for my personal projects, but after I started a new job I decided to use Sourcetree for my job, but every time I try to add the new account (it is recognizing my personal account that I use in Fork) it shows the "Grant Access" web page, and when I click on Grant Access I get a message that says "Do you want to allow this page to open "Fork.app"? and I have not been able to change this to sourcetree.

I've already tried to

  • Edit the global git configuration adding the helper parameter
  • I could not right click a repository and change the open with app because the repo is a folder not a file
  • git config --global url."git://".insteadOf "sourcetree://"

1 answer

0 votes
Martin Runge
Community Champion
September 2, 2026

Hi @Xirion11

Welcome to the Atlassian community!

This is a macOS URL scheme handler issue, not a git setting, so I would look at LaunchServices instead of git config.

Fork has likely claimed the scheme. I would rebuild the handler database in Terminal:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

Then restart the Mac and relaunch Sourcetree so it re-registers.
I would revert the url.insteadOf line in your global config, since it will not help here and can affect clones later.

Cheers, Martin

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events