git-filter-branch
OfficialExtract subdirectory history with git fallback.
Software Engineering#git#repository migration#filter-branch#subdirectory history#commit preservation#fallback tooling#merge unrelated histories
AuthorCogni-AI-OU
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps you migrate a specific subdirectory from one Git repository into another while preserving the original commit history for that subdirectory, even when newer tools like git-filter-repo are unavailable.
Core Features & Use Cases
- Subdirectory history extraction: Rewrites history so only the chosen path becomes the root of the filtered repository.
- History-preserving merge: Merges the isolated, rewritten commit graph into your target repository while allowing unrelated histories.
- Safety guidance for common failures: Covers pitfalls such as root-file conflicts, long runtimes on large repos, and pre-commit hook issues.
Quick Start
Use the git-filter-branch skill to extract the folder you care about as a standalone history by running git filter-branch with the --subdirectory-filter option on the source repository, then merge the filtered remote into your main repository with --allow-unrelated-histories.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: git-filter-branch Download link: https://github.com/Cogni-AI-OU/cogni-ai-agent-skills/archive/main.zip#git-filter-branch Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.