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.
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.
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.
(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)
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...
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!
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