GitHub was showing documentation folders (ai-sdk, astro, convex, effectts) as external links (submodules) instead of browsable folders. This happened because each folder had its own .git directory.
We set up a hybrid approach:
- All 2,316 documentation files are visible and clickable
- No submodules, just regular folders
- Perfect for browsing docs directly on GitHub
.gitdirectories preserved in each documentation foldersync.shscript still works to pull upstream changes- Can run local git operations in each folder
# Git directories in subfolders (keep local for syncing, exclude from GitHub)
ai-sdk/.git/
astro/.git/
convex/.git/
effectts/.git/This tells Git to:
- ✅ Track all documentation files
- ❌ Ignore .git directories (don't push them to GitHub)
The sync.sh script works because:
.gitdirectories exist locally (not pushed to GitHub)- Each folder can run
git pullto get upstream updates - Documentation files are then committed to the main docs repo
On GitHub you see:
- ✅ ai-sdk/ folder with 810 browsable files
- ✅ astro/ folder with 795 browsable files
- ✅ convex/ folder with 434 browsable files
- ✅ effectts/ folder with 276 browsable files
cd /Users/toc/Server/ONE/docs
# Test first (dry run)
./sync.sh --dry-run
# Run sync
./sync.sh
# Commit and push updates
git add -A
git commit -m "docs: sync upstream documentation sources"
git push origin main- sync.sh pulls latest changes from upstream repos into local folders
- You review the changes with
git status - You commit the file changes (not .git directories)
- You push to GitHub
- All docs remain browsable on GitHub
| Folder | Upstream Repository | Local .git | GitHub Files |
|---|---|---|---|
| ai-sdk/ | https://github.com/vercel/ai | ✅ Syncs | ✅ Browsable |
| astro/ | https://github.com/withastro/docs | ✅ Syncs | ✅ Browsable |
| convex/ | https://github.com/get-convex/convex-backend | ✅ Syncs | ✅ Browsable |
| effectts/ | https://github.com/Effect-TS/website | ✅ Syncs | ✅ Browsable |
| claude-code/ | Maintained directly | N/A | ✅ Browsable |
- AI SDK: 810 files
- Astro: 795 files
- Convex: 434 files
- Effect TS: 276 files
- Total: 2,315 documentation files + README, sync scripts
✅ All docs browsable on GitHub
- No submodule links
- Click through folders and files
- Read docs directly on GitHub
✅ Easy local syncing
- Run
./sync.shto update all docs - Automatic upstream tracking
- No manual work needed
✅ Version controlled
- Full git history
- Can revert changes
- Track upstream updates
# View current status
git status
# Sync all documentation
./sync.sh
# Sync with dry-run (preview only)
./sync.sh --dry-run
# Manual sync individual folder
cd ai-sdk && git pull origin main
# Commit docs updates
git add -A
git commit -m "docs: sync upstream documentation sources"
git push origin mainCheck .git directories exist locally:
ls -la ai-sdk/.git astro/.git convex/.git effectts/.gitIf missing, the .git directories were accidentally pushed. Contact for help.
The .git directories should NOT be pushed. They should be in .gitignore:
cat .gitignore | grep ".git/"Should show:
ai-sdk/.git/
astro/.git/
convex/.git/
effectts/.git/
GitHub Repository (one-ie/docs)
├── README.md (browsable)
├── SYNC-GUIDE.md (browsable)
├── sync.sh (browsable)
├── ai-sdk/ (browsable folder)
│ ├── docs/ (browsable)
│ ├── cookbook/ (browsable)
│ └── [.git/ - local only, ignored by GitHub]
├── astro/ (browsable folder)
│ └── [.git/ - local only, ignored by GitHub]
├── convex/ (browsable folder)
│ └── [.git/ - local only, ignored by GitHub]
└── effectts/ (browsable folder)
└── [.git/ - local only, ignored by GitHub]
Local Machine
├── .git/ (main repo)
└── docs/
├── ai-sdk/.git/ ← tracks vercel/ai
├── astro/.git/ ← tracks withastro/docs
├── convex/.git/ ← tracks get-convex/convex-backend
└── effectts/.git/ ← tracks Effect-TS/website
Result: Best of both worlds - browsable docs on GitHub + local sync capability! 🎉