技能 git-advanced-workflows
🧭
git-advanced-workflows
安全 🌐
網路存取⚙️
外部命令📁
檔案系統存取
掌握進階 Git 工作流程和復原技術
進階 Git 歷史記錄操作可能具有風險且耗時。本技能提供關於 rebase、cherry-pick、bisect、worktree 和 reflog 復原的明確指導。
支援: Claude Codex Code(CC)
1
下載技能 ZIP
2
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
3
開啟並開始使用
測試它
正在使用「git-advanced-workflows」。 我不小心重設到錯誤的 commit 並遺失了工作。如何復原?
預期結果:
- 執行 git reflog 並找出重設前的 commit
- 在該 commit 雜湊上建立復原分支
- 驗證變更並從復原分支繼續工作
正在使用「git-advanced-workflows」。 如何一次將安全性修復套用至三個發布分支?
預期結果:
- 先在 main 分支上建立修復
- 取出每個發布分支並 cherry-pick 修復 commit
- 處理每個分支的衝突
- 推送前測試每個分支
安全審計
安全v4 • 1/17/2026
Documentation-only skill containing pure instructional content about Git workflows. No executable code, network calls, file access, or environment variable reads were found. All content is educational text explaining Git commands. Static findings are false positives triggered by documentation patterns, hash identifiers, and markdown code blocks.
2
已掃描檔案
574
分析行數
3
發現項
4
審計總數
風險因素
🌐 網路存取 (1)
⚙️ 外部命令 (41)
SKILL.md:28 SKILL.md:29 SKILL.md:30 SKILL.md:31 SKILL.md:32 SKILL.md:33 SKILL.md:36-45 SKILL.md:45-51 SKILL.md:51-63 SKILL.md:63-69 SKILL.md:69-86 SKILL.md:86-89 SKILL.md:89-95 SKILL.md:95-101 SKILL.md:101-116 SKILL.md:116-122 SKILL.md:122-138 SKILL.md:138-144 SKILL.md:144-159 SKILL.md:159-163 SKILL.md:163-179 SKILL.md:179-183 SKILL.md:183-204 SKILL.md:204-208 SKILL.md:208-228 SKILL.md:228-232 SKILL.md:232-247 SKILL.md:247-263 SKILL.md:263-277 SKILL.md:277-283 SKILL.md:283-298 SKILL.md:298-304 SKILL.md:304-323 SKILL.md:323-329 SKILL.md:329-338 SKILL.md:338-350 SKILL.md:350-359 SKILL.md:359-372 SKILL.md:372-391 SKILL.md:41 SKILL.md:36-45
📁 檔案系統存取 (6)
審計者: claude 查看審計歷史 →
品質評分
38
架構
100
可維護性
85
內容
21
社群
100
安全
91
規範符合性
你能建構什麼
清理功能分支歷史
在開啟 Pull Request 之前,準備線性 commit 歷史記錄。
安全地回移熱修復
透過 cherry-pick 步驟,將修復套用至多個發布分支。
找出回歸問題的 commit
使用 bisect 步驟找出引入錯誤的 commit。
試試這些提示
rebase 基礎
說明安全地擠壓和改寫最近五個 commit 的確切互動式 rebase 步驟。
cherry-pick 修復
解釋如何將特定 commit cherry-pick 到 release/2.0,以及衝突後如何繼續。
使用測試進行 bisect
提供逐步的 git bisect 工作流程,使用測試指令找出回歸問題。
worktree 和復原
說明如何使用 worktree 處理平行分支,以及如何使用 reflog 復原遺失的 commit。
最佳實務
- 在進行有風險的歷史編輯前建立備份分支
- 重寫共享歷史時使用 --force-with-lease
- 保持 commit 簡潔且具有描述性,以便更易於復原
避免
- 對協作者使用的公開分支進行 rebase
- 在不檢查遠端更新的情況下強制推送
- 在有未暫存變更的目錄中執行 bisect
常見問題
此技能是否相容於所有 Git 版本?
它適用於支援 rebase、bisect、worktree 和 reflog 的現代 Git 版本。
它會自動更改我的儲存庫嗎?
不。它僅提供指導,不會執行指令或修改檔案。
它可以與我的 CI 或指令碼整合嗎?
它可以建議步驟,但不會執行或設定 CI 管道。
它會存取我的資料或憑證嗎?
不。它不會讀取檔案、環境變數或網路資源。
如果我無法解決衝突怎麼辦?
分享衝突詳細資訊和目前狀態以取得針對性的步驟。
這與基本的 Git 說明有何不同?
它專注於進階工作流程,如 bisect、reflog 復原和 worktree。