I have reorganized the folder structure for my repositories in the Mac Finder and now when I open up Git Tower it is informing me that those repositories can't be located. This I understand however I"m trying to figure out how I can update the location of the repository from inside the application. I've looked on the Tower website and researched using Google however I have not come up with any possible solutions.
Does anyone have any suggestions?
This is quite hacky, but I was able to edit Tower's sqlite file directly and change all broken repo paths at once.
On my system, the file was located here:
~/Library/Application Support/com.fournova.Tower2/Tower.sqlite3
. And OF COURSE make a backup before you proceed.
I then used DB Browser for SQLite to run the following SQL queries (all at once):
UPDATE ZGTGITREPOSITORY SET ZFILEURLSTRING = REPLACE (
ZFILEURLSTRING,
'/OldPath/',
'/NewPath/');
UPDATE ZGTGITREPOSITORY SET ZGITDIRECTORYURLSTRING = REPLACE (
ZGITDIRECTORYURLSTRING,
'/OldPath/',
'/NewPath/');
UPDATE ZGTGITREPOSITORY SET ZWORKINGTREEDIRECTORYURLSTRING = REPLACE (
ZWORKINGTREEDIRECTORYURLSTRING,
'/OldPath/',
'/NewPath/');
A few notes:
/my path with spaces/
becomes /my%20path%20with%20spaces/
This is a known bug for Tower 2.5 Mac and it's being worked on.
In the meantime, you'll have to add new bookmarks to replace the old ones.
The most straightforward way to add new bookmarks would be to use drag & drop from Finder into Tower's Repository View. Since Tower 2.5 you can do so with multiple repository folders selected in Finder.
Disclaimer: I'm with the support team of Tower
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With