Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

CLI (Command Line Interface) to Add Local Repo to SourceTree [Windows]

Is there any way to Add a local repository to be tracked by SourceTree without using the GUI?

I'm creating some workflow tools for an internal package manager for which it is important to be able to add a local repository to SourceTree via a command line. This will be run automatically by my tools and shouldn't require the user's input (besides maybe input of a username/password) 

If there is a file that contains a list of repositories that I can edit, that would work as well. I tried looking around in the Program Files, but didn't find anything except an XML for which tabs were open.


Using the latest SourceTree version (3.0.17) on Windows 10.


1 answer

0 votes
minnsey Atlassian Team Feb 07, 2019


I'm afraid there isn't currently a CLI to do that, however you could amend the %localappdata%\Atlassian\Sourcetree\bookmarks.xml

How to do the same on Mac OS. Is that possible for one to add the repo to the Sourcetree GUI from the terminal?

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events