Open SourceTree from Command Line

John Jung
John Jung
Oct 29 · 1 min read

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 .

johnjjung

John Jung — CTO of June.ai

John Jung

Written by

John Jung

Co-founder & CTO @ June.ai

johnjjung

johnjjung

John Jung — CTO of June.ai

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade