Open SourceTree from Command Line

John Jung
johnjjung
Published in
1 min readOct 29, 2019

I like SourceTree because it provides an intuitive interface for all the git commands that I don’t remember, especially for advanced merges, etc…

This quick shortcut will help you open SourceTree from your terminal. Note, you can probably do this with other git clients. The breakdown is using the open command -a is just specifying the application.

open -a SourceTree /path/to/repoalias sourcetree='open -a SourceTree'

Then you can do:

sourcetree /path/to/repo

If you’re already in your repo directory you can do:

sourcetree .

BTW, you can also use this to open finder

open .

--

--