I wish I could drag a folder into the SourceTree icon instead of having to use the file menu

On mac:

I want to drag a folder from Finder onto the SourceTree icon to have it open that folder.

Also, I want to be able to use a command line shortcut.

Backgound:

As a user that normally uses git from the shell, sometimes my git folder gits into a mess where I have a lot of branches, or I'm hunting for that particular commit, or something that SourceTree excells at, and I would like to quickly open SourceTree from the shell via command (like `sourcetree .`) or be able to drag the filder folder onto the SourceTree icon in my doc so I can skip having to add the folder to the bookmarks or have to use the file menu to find the folder.

2 answers

1 accepted

This widget could not be displayed.

You can do both of these things right now, but you need to be using the direct version from our website at http://sourcetreeapp.com .

Unfortunately the drag-to-icon feature was broken by a bug specific to the Mac App Store version which we didn't realise for a while, and Apple have now stopped accepting updates for SourceTree in MAS (after 1.5.6). The command line tool installer is not allowed in the Mac App Store version either - in the direct version you can click the menu option SourceTree > Install Command Line Tools.

Going back to the version direct from your website has these features. Thanks!

This widget could not be displayed.

Hi James,

(First read what Steve said above, too)

You can drag anything onto the SourceTree icon and it should offer the option to create a bookmark. If it is not doing this then the option to 'Offer to create bookmarks for newly opened repositories' on the 'General' tab (at the bottom) of your SourceTree preferences is disabled.

As for opening SourceTree from the command line with a folder as a parameter, you can already do this. Just enter the following command:

open -a SourceTree path_to_my_folder

If the folder you've specified isn't an existing repository in SourceTree then it will offer you the option to create it as a bookmark.

(EDIT: As Steve says, better to use 'stree' rather than 'open' command as it works differently)

Cheers

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

878 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