shiganluo/skill/git-history-rewriting
Claude Code and agent skill by shiganluo/skill
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Remove files/dirs from all git history with filter-repo.
Install
npx vskill@latest install shiganluo/skill/git-history-rewritingSKILL.md
Git History Rewriting
Remove files, directories, secrets, or patterns from all git history using git-filter-repo (preferred) or BFG Repo-Cleaner.
When to Use
- User asks to remove a file/directory from git history
- Need to purge secrets, credentials, or large blobs from all commits
- Cleaning up accidentally committed build artifacts, caches, or data files
Prerequisites
1. Remove a Path from History
2. Strip Large Files
3. Replace Text (e.g. secrets)
Post-Operation Checklist
After every filter-repo run:
Pitfalls
P1: already_ran blocks non-interactive runs
.git/filter-repo/already_ran causes interactive Y/N prompt → EOFError in agents.
P2: origin remote removed by design
filter-repo strips all remotes. Always re-add after.
P3: Force-push required
git push --force needed. Coordinate with collaborators.
P4: Shallow clones
filter-repo requires full history:
BFG Repo-Cleaner (Alternative)
BFG requires bare clone; filter-repo works on both.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggithub/git-history-rewriting/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shiganluo/skill/git-history-rewriting)