Hermes Agent v2026.4.13 -> v2026.4.16
.entry-content{max-width:100%!important;width:100%!important;padding:0!important}
日期: 2026年4月22日
升級: v2026.4.13 → v2026.4.16
執行者: Michael Lee(Mac terminal 操作)
1. 問題背景:為什麼這次不能直接在 GitHub 網站上操作?
核心原因:GitHub 網站沒有「fetch upstream tag」功能
GitHub 的 Sync fork 只能把 upstream/main 的變更同步過來,無法把 upstream 的某一個 tag(例如 v2026.4.16)fetch 到自己的 fork。
fetch upstream tags 是一個「寫入你 fork 的 git database」的動作,GitHub 網站根本沒有這個功能。
唯一的方法:本地 git CLI → 然後 push 到 GitHub
2. 升級前狀態
Mac 上的 ~/hermes 倉庫
項目內容 remotekuniakil(指向 GitHub fork)、origin(指向 NousResearch upstream) 目前分支my-config-v2026.4.13 Custom commits只有 1 個:b49d9b53(docker-compose.yml 修改) 未 commit 變更docker-compose.yml(modified)、多個 .DS_Store upstream tags沒有 fetch 過 v2026.4.16
GitHub 上的 my-config-v2026.4.13 分支
項目內容 Custom commits4 個(b49d9b53、0e17e95、db569ab、fe71819) 內容新增 GitHub Actions workflow、Comment out npm/Playwright、安裝在 GitHub 網站上做的
Mac 和 GitHub 的 my-config-v2026.4.13 不一致 — 這是衝突的根本原因。Mac 的 branch 只有 1 個 custom commit,GitHub 的有 4 個(含 GitHub Actions workflow)。
3. 升級流程圖
Mac ~/hermes fetch upstream tags → 建立新分支 基於 v2026.4.16 → Cherry-pick 4 個 custom commits → Push 到 GitHub kuniakil remote → GitHub Actions 燒雙架構 image → Crane tag v2026.4.16
4. 實際執行的命令
Step 1:確認 GitHub 上有 v2026.4.16 tag
git ls-remote –tags origin | grep v2026.4.16 結果:4a0358d2e741eb… refs/tags/v2026.4.16
Step 2:Fetch upstream tag 到本地
git fetch origin refs/tags/v2026.4.16:refs/tags/v2026.4.16
Step 3:Stash 暂存未 commit 的變更
git stash push -m “docker-compose local changes” 因為 docker-compose.yml 有修改还未 commit,直接 checkout 會报错。
Step 4:建立新分支(基於 upstream v2026.4.16)
git checkout -b my-config-v2026.4.16 v2026.4.16
Step 5:Cherry-pick 4 個 custom commits
git cherry-pick fe718197 db569aba 0e17e958 b49d9b53 順序要從舊到新(founder → newer)。第一個 commit(fe71819)成功;第二個(db569ab)有 conflict,因為 upstream 刪除了 ghcr-publish.yml。解決方式:保留檔案後 git cherry-pick --continue。第三個(0e17e958)因與第二個重疊被 skip。第四個成功。
Step 6:確認 commits 正確
git log –oneline | head -10 88576faf 使用本地 build image(hermes:local) a9e01630 Update GitHub Actions workflow for build timeout and versioning 82fcf968 Comment out npm and Playwright installation commands 1dd6b5d5 chore: release v0.10.0 (2026.4.16) …
Step 7:Push 到 GitHub fork
git push kuniakil my-config-v2026.4.16 用 kuniakil remote(指向 fork),不是 origin(指向上游 NousResearch)。
Step 8:手動觸發 GitHub Actions
進 GitHub Actions 頁面
選
Build and Push to GHCR選 branch
my-config-v2026.4.16按 Run workflow
結果:Build 成功,13 分 22 秒,雙架構(linux/amd64 + linux/arm64)。
Step 9:標記 version tag(用 crane)
crane tag ghcr.io/kuniakil/hermes-agent:latest v2026.4.16 之後部署可以用 v2026.4.16 而非 latest。
5. Cherry-pick 衝突處理記錄
Commit衝突檔案處理方式 fe71819DockerfileAuto-merged,成功 db569ab.github/workflows/ghcr-publish.ymlConflict:上游刪除了此檔案,commit 試圖修改它。選擇「保留檔案」(因為要繼續用 GitHub Actions 燒 image)。 0e17e958.github/workflows/ghcr-publish.ymlConflict with db569ab(檔案已被 db569ab 建立並修改)。Skip。 b49d9b53docker-compose.yml成功(已被 stash)
6. 升級後的分支結構
upstream/main(v2026.4.16)
1
1dd6b5d5 — chore: release v0.10.0 (2026.4.16)
my-config-v2026.4.16(最新)
1
2
3
4
5
6
7
88576faf — 使用本地 build image(hermes:local)← custom
a9e01630 — Update GitHub Actions workflow for build timeout and versioning ← custom
82fcf968 — Comment out npm and Playwright installation commands ← custom
1dd6b5d5 — chore: release v0.10.0 (2026.4.16) ← upstream base
7. 為什麼這次需要 CLI 的總結
動作GitHub 網站需要的工具 Fork 一個 repo✓— 在 GitHub 網站上修改並 commit✓— 從 upstream 某個 tag/shatag 建立 branch✗本地 git Fetch upstream tags 到 fork✗本地 git Cherry-pick commits(跨 branches)✗本地 git Trigger GitHub Actions✓—
下次升級:VPS 上有 git + CR_PAT,可以直接在 VPS 上做,不需要動 Mac。
8. 最終成果
項目值 新分支my-config-v2026.4.16(基於 upstream v2026.4.16) Custom commits3 個(0e17e958 skip 了) Image URLghcr.io/kuniakil/hermes-agent:latest Image SHAsha256:ffad8595039e0fc8b281ca500bed35fba8dfc5e4801be1340115cd03babefc44 Tagged asv2026.4.16 Architectureslinux/amd64, linux/arm64 Build time13 分 22 秒