It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to change folder path of existing bookmark all at once?

Sean Lee Apr 14, 2013

My SourceTree is on OSX 10.8.3

I like to move existing project folders somewhere else, but there seems to be no easy way to change the folder path on existing bookmarks. The project folder under SourceTree preferences is merely for future new addition. For existing ones, I have to change it one by one.

Anyone knows how to change the folder path on existing bookmarks all at once?

2 answers

1 accepted

2 votes
Answer accepted

Hi Sean,

You'd have to modify the browser.plist file for SourceTree. I'd be very careful modifying this file though as if it's corrupt then SourceTree will have a hard time reading it. I recommend backing up this file first. It's located in /Users/<user>/Library/Application Support/SourceTree. Strangely, TextMate can't seem to read a plist file on my system, but TextWrangler managed it fine as it's just an XML file.

Step 1: Within this XML file you'll see your repository name immediately followed by the path to the repository. So, and I'm sure you guessed it, you can just do a find/replace. A caveat is that you could still wreck other repositories if your find/replace isn't specific enough. Using my repositories as example, if I suddenly decided to move everything up a level I'd do a replace on "/Users/Kieran/Documents/Development/" and change it to "/Users/Kieran/Documents/".

Step 2: Now you need to move your actual repository folders, "mv" doesn't allow wildcards in either operands so you'll need to use a loop for this, and you'll also only want to list directories. So you'd need something along the lines of:

for folder in `find . -type d -maxdepth 1 -not -name .` ; do
	mv -v $folder &lt;wherever&gt;

Basically test the mv command so your folders go to the right place. Hopefully that should get the ball rolling for you.


0 votes
David Jameson Nov 08, 2015

I need to modify that file too because I had to change the name of the underlying hard drive where everything is saved.

However on my system, that file (browser.plist) looks like it's binary, it's certainly not XML.

I tried using a PList Editor but it just told me the file was corrupted.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

1,888 views 14 18
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you