将云端服务器和 WSL 的 Hermes 核心配置(config、skills、memories、logs)纳入 Git 版本管理,推送到 GitHub 私有仓库,实现系统重装后的快速恢复。
main — 云端环境 vm-0-13-ubuntu
local — WSL 环境 localhost
总预计耗时:5~10 分钟
install.shapt install本地 ~/secure/gh auth loginbash recover.sh从本地复制gateway start| ☁️ 云端 | 🖥️ WSL | |
|---|---|---|
| 模型 | deepseek-v4-flash | deepseek-chat |
| Streaming | ✅ 开启 | ❌ 关闭 |
| 个性 | 默认 | kawaii 😺 |
| 密钥脱敏 | ✅ 已装 | ✅ 已装 |
| Tirith | ✅ 已装 | ✅ 已装 |
| 平台 | WeCom | WeCom + Discord |
| 分支 | main | local |
cd ~/.hermes
git init
git add -A
git status # 确认无敏感文件
git commit -m "chore: init hermes dotfiles backup [cloud]"
git checkout -b local
git commit --allow-empty -m "chore: init local branch for WSL"
git checkout main
gh repo create hermes-dotfiles --private --push
git push --all origin
cd ~/.hermes
git init
git add -A
git commit -m "chore: init hermes dotfiles backup [local]"
git remote add origin https://github.com/<用户名>/hermes-dotfiles.git
git fetch origin
git rebase origin/local
git push --set-upstream origin local
0 3 * * * cd ~/.hermes && git add -A && git diff --cached --quiet || git commit -m "chore: auto backup $(date +\%Y-\%m-\%d)" && git push origin main
WSL(凌晨 4 点):
0 4 * * * cd ~/.hermes && git add -A && git diff --cached --quiet || git commit -m "chore: auto backup $(date +\%Y-\%m-\%d)" && git push origin local