https://github.com/metaory/forks-hollow
Keep your fork tree layout - Drop the weight - Restore when you need the code
https://github.com/metaory/forks-hollow
Last synced: 11 days ago
JSON representation
Keep your fork tree layout - Drop the weight - Restore when you need the code
- Host: GitHub
- URL: https://github.com/metaory/forks-hollow
- Owner: metaory
- License: mit
- Created: 2026-06-01T08:02:07.000Z (11 days ago)
- Default Branch: master
- Last Pushed: 2026-06-01T08:09:44.000Z (11 days ago)
- Last Synced: 2026-06-01T10:09:16.800Z (11 days ago)
- Language: Shell
- Homepage:
- Size: 58.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
forks-hollow
Keep your fork tree layout
Drop the weight
Restore when you need the code
---
## Why
I kept **500+ cloned repositories** in a hand-built tree: top-level buckets like `+UI`, `+ZSH`, `+DOC`, with nested `+`-prefixed categories inside (e.g. `+UI/+UI-LIB/...`). Each leaf was a normal git clone. The layout was meaningful; the disk use was not **gigabytes** for repos I rarely touch.
I still wanted the same paths, remotes, and README context. I did not want full checkouts sitting on disk all the time.
## What it does
`Hollow` a clone forest into a separate directory:
- Same directory structure as the source tree
- Each repo keeps `.git` and `README.md` only; everything else is stripped
- Result is typically a few megabytes instead of gigabytes
Two CLI tools:
| Command | Role |
| --------------- | --------------------------------------------------------------------- |
| `hollow-index` | Scan nested clones, write hollow copies to `-o` |
| `hollow-unpack` | Walk hollow repos, `fetch` + checkout latest default branch into `-o` |
## Usage
```bash
hollow-index -i /path/to/full-clones -o /path/to/hollow
hollow-unpack -i /path/to/hollow -o /path/to/restored
```
Both take `-i` / `--input` and `-o` / `--output`. Structure is preserved end-to-end.
## Roadmap
- Selective unpack (one repo or subtree) instead of restoring everything in one run
---
## License
[MIT](LICENSE)