How to set default file viewer in SourceTree?

SourceTree uses the default "Open With" application like Explorer. As far as I know other than changing the default application used by each file extension you cannot change the behavior of the menu item in SourceTree.

However...

You can add a custom action to achieve the same result using Tools | Options, Custom Actions tab:

Adding a custom action

This will appear under the Custom Actions menu. As far as I know you cannot add a shortcut key to custom actions.

The SourceTree blog has more info.


I had this same problem for my MacBook.

To have sourcetree Open selected version, or Open current version a file with your desired program, change the system-wide default app used to open the file type to your desired app:

  1. using Finder, find a file with the same file type that you are trying to open via SourceTree

    • TIP: if cannot find file with same file type, can create one via Terminal with command:

      touch file.filetype
      
  2. right click said file in Finder

  3. click Get Info
  4. expand Open With:
  5. use revealed drop-down menu to select desired app
  6. below the drop-down menu, click Change All...
  7. in the pop-up window, click Continue
  8. done!
  9. go to SourceTree and Open selected version, or Open current version that file :)

reference: https://www.laptopmag.com/articles/how-to-change-default-applications-mac