static Future<String> getPreviousRef(String? root) async { final tags = await getVersions(root); if (tags.isEmpty) { throw const GitException('No tags found'); } return tags.last.$1; }