Utility for Fetching and Syncing Individual Files from Git Repositories
By
andrewmcwatters
9mo ago· 4 min readenCode
95/100
Golden Brown
Bagelometer↗
Slow-proofed and worth the wait. Worth its weight in flour.
Score95Typehow-toSentimentneutral
Summary
git-fetch-file is a utility tool designed to fetch and sync individual files or globs from other Git repositories into your project. It maintains a manifest (.git-remote-files) to track the origin, commit, and comments of the imported files, functioning like a mini submodule for specific files. Key features include pulling single files or globs, tracking changes, and optionally overwriting local changes with --force.
Key quotes
· 4 pulledgit-fetch-file(1) is a utility for importing specific files from other Git repositories into your own project while keeping a manifest (.git-remote-files) that remembers where they came from and what commit they belong to.
It’s like a mini submodule, but for just the files you want.
Pull a single file or glob from a remote Git repo.
Track origin, commit, and comments in .git-remote-files.
Fetch and sync individual files or globs from other Git repositories, with commit tracking and local-change protection - andrewmcwattersandco/git-fetch-file
