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:
- That's basically doing a "find and replace" so your old path needs to be exactly accurate or else it won't be found.
- You need to URL encode the path, so
/my path with spaces/
becomes /my%20path%20with%20spaces/
- Did I mention make a backup of the file before you proceed?