| name | git-limited-history-analysis |
| description | Analyze git repositories with limited or shallow history. When full commit history is unavailable, use targeted searches and parallel extraction to surface themes, contributors, and patterns from partial data. Trigger keywords: shallow clone, limited history, partial repo, git fetch failed, analyze without full history. |
| license | MIT |
| metadata | {"version":"1.0.0","hermes":{"tags":["Git","Analysis","Shallow-clone","Research"],"related_skills":["git-commit-theme-analyzer","git-sync-failure-diagnosis"]}} |
Git Limited History Analysis
Extract insights when full history is unavailable (shallow clones, truncated logs, fetch failures). Shift from quantitative to targeted qualitative analysis.
Step 1: Assess available data
git log --oneline | wc -l
git log --oneline -1 --format="%ai"
cat .git/shallow 2>/dev/null && echo "Shallow clone detected"
Step 2: Fetch more if possible
BR=$(git rev-parse --abbrev-ref origin/HEAD | sed 's@^origin/@@')
git fetch --depth=100 origin "$BR" 2>&1
git fetch --depth=50 origin "$BR"
git fetch origin <commit-hash>
Step 3: Parallel theme extraction
git log --format="%s" -100 | grep -iE "(fix|bug|crash|error)"
git log --format="%s" -100 | grep -iE "(add|feature|support)"
git log --format="%s" -100 | grep -iE "(performance|optim|fast)"
git log --format="%s" -100 | grep -iE "(security|xss|inject|cve)"
git log --format="%s" -100 | grep -iE "(refactor|cleanup)"
git log --format="%s" -100 | grep -iE "(doc|readme|guide)"
Step 4: Contributor analysis
git log --format="%an|%s" -100 | awk -F'|' '{print $1}' | sort | uniq -c | sort -rn
git log --author="<name>" --format="%s" -50
Output Calibration
| Data available | Report scope |
|---|
| 1-10 commits | Specific changes only; explicitly note limited scope |
| 10-50 commits | Recent trends, active contributors |
| 50-100 commits | Theme analysis, component activity |
| 100+ commits | Full pattern analysis |
Quality Signals
With limited commits, prioritize:
- Merge commits — often carry PR-summary detail
- Detailed commit messages — over short ones
git show --stat on key commits — file change patterns
- Author specialization — who works on what
Pitfalls
- "Recent activity" with only 1-2 commits is misleading
- Contributor stats are noise with <10 commits
- Trend analysis is invalid with <30 commits
- Always disclose data limitations in the output