github-history-cleanup
从 GitHub 历史中彻底清除敏感文件的完整流程 — 使用 git filter-repo + force push,适用于清理意外提交的个人文件、工作文件等
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
从 GitHub 历史中彻底清除敏感文件的完整流程 — 使用 git filter-repo + force push,适用于清理意外提交的个人文件、工作文件等
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
🧠 ontology-clawra v5.1 - Local Ontology Reasoning & Learning Engine **USE THIS SKILL WHENEVER** you need structured reasoning, knowledge graph management, logical inference, or learning from interactions. This is your go-to tool for: - Building and querying ontology knowledge graphs (concepts, entities, relationships) - Performing confidence-based reasoning with evidence tracking - Recording insights and patterns from completed tasks - Local memory search and knowledge retrieval **Key Use Cases:** - Before making complex decisions: "Let me use ontology-clawra to reason about this" - After completing tasks: "Record this learning to ontology-clawra" - Building domain expertise: "Create concepts for [domain] in ontology-clawra" - Analyzing patterns: "Query ontology-clawra for similar past cases" **Core Capabilities:** ✅ Local ontology storage in `~/.openclaw/skills/ontology-clawra/memory/` ✅ Confidence calculation (CONFIRMED/ASSUMED/SPECULATIVE) ✅ Learning from user confirmations ✅ Local memory search (no ne
Complete guide to using and extending Hermes Agent — CLI usage, setup, configuration, spawning additional agents, gateway platforms, skills, voice, tools, profiles, and a concise contributor reference. Load this skill when helping users configure Hermes, troubleshoot issues, spawn agent instances, or make code contributions.
Git push to HTTPS remote using token authentication — avoids SSH setup, works in CI/automated environments.
清理 GitHub 历史和 ClawHub 中意外泄露的个人/工作文件
Configure WhatsApp and Telegram messaging platforms on Hermes Agent
Configure Telegram bot messaging channel for Hermes Agent, especially useful when behind Chinese firewall with SOCKS proxy
| name | github-history-cleanup |
| description | 从 GitHub 历史中彻底清除敏感文件的完整流程 — 使用 git filter-repo + force push,适用于清理意外提交的个人文件、工作文件等 |
| version | 1.0 |
| last_updated | 2026-04-09 |
| author | Clawra |
| tags | ["git","security","privacy","github"] |
git reset --hard 会删除所有未跟踪的文件! 如果本地有文件但 GitHub 历史已被清理,直接 reset 会丢失本地文件。必须在操作前确认本地文件是否有备份。
# 确认本地有哪些未跟踪的重要文件
git status --porcelain
# 把它们复制到安全位置
cp -r /path/to/sensitive-stuff ~/backup/
cd /tmp
rm -rf repo-clean
git clone --mirror https://github.com/USER/REPO.git repo-clean
cd repo-clean
# 安装(如果没装)
pip install git-filter-repo
# 移除敏感路径(--invert-paths 表示排除这些文件)
git filter-repo --path Documents --invert-paths --force
# 可以同时移除多个路径:
# git filter-repo --path Documents --path .env --path secrets/ --invert-paths --force
cd repo-clean
git remote add origin https://github.com/USER/REPO.git
git push --force origin main
# 重要:先确认本地是否有未跟踪的重要文件
git status --porcelain
# 如果有,先备份再操作
cp -r . ~/repo-backup/
git fetch origin
git reset --hard origin/main
# 如果没有未跟踪文件,可以直接:
git fetch origin
git reset --hard origin/main
# 确认 GitHub 历史已清理
git log --all --name-only | grep -i "敏感词"
# 确认本地文件完整
ls -la
java -jar bfg.jar --delete-files Documents
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push --force
BFG 比 git-filter-repo 更快,但需要 Java 环境。
如果同时发布到 ClawHub,清理 GitHub 后需要重新发布:
clawhub delete SLUG --yes
clawhub publish . --version X.Y.Z --changelog "清理版本"
git reset --hard origin/main 而不检查本地未跟踪文件git status --porcelain 确认本地是否有需要保留的文件