首次同步

gstore教程

首次同步

gstore 用本机 Git 和 gh,通过独立缓存仓库同步设置和数据。先准备 git、gh 和已安装的 gstore。

git --version
gh --version
slothtool gstore doctor --json
slothtool gstore auth

auth 输出登录地址与一次性代码,由你在浏览器完成授权,不会自动打开浏览器。不要分享代码或 Token。

绑定专用仓库

slothtool gstore repo set YOUR_ACCOUNT/slothtool-data --create
slothtool gstore repo status --json

替换账号名。--create 会创建 GitHub 私有仓库;已有仓库则省略,并确认有访问权限及正确可见性。私有仓库不是加密保险箱,Git 历史可能保留已删除的敏感内容。

检查并同步

slothtool gstore list --json
slothtool gstore status --json
slothtool gstore sync

默认系统范围为 settings.json、排除自身 gstore.json 的 plugin-configs、data。注册表、插件程序和缓存不传输,数据目录内不创建 .git。

sync 可同时拉取和推送,不是单纯上传。想表达单向操作时使用 pull 或 push;出现冲突按解决同步冲突处理,不把覆盖策略设为固定默认。

同步后再次查看状态。第二台机器的恢复步骤见第二台设备恢复,新增目录会扩大后续全量同步范围,见目录绑定。