{"id":18301576,"url":"https://github.com/cyd3r/git-pfs","last_synced_at":"2026-05-17T02:05:36.450Z","repository":{"id":210944979,"uuid":"301427055","full_name":"cyd3r/git-pfs","owner":"cyd3r","description":"An experiment to replace Git LFS with two text files.","archived":false,"fork":false,"pushed_at":"2020-10-06T08:36:11.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T03:47:40.002Z","etag":null,"topics":["git","git-lfs","poor-mans-choice"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyd3r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-10-05T13:59:12.000Z","updated_at":"2020-10-09T17:36:49.000Z","dependencies_parsed_at":"2023-12-05T18:05:11.398Z","dependency_job_id":null,"html_url":"https://github.com/cyd3r/git-pfs","commit_stats":null,"previous_names":["cyd3r/git-pfs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyd3r%2Fgit-pfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyd3r%2Fgit-pfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyd3r%2Fgit-pfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyd3r%2Fgit-pfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyd3r","download_url":"https://codeload.github.com/cyd3r/git-pfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248017909,"owners_count":21034042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","git-lfs","poor-mans-choice"],"created_at":"2024-11-05T15:16:21.490Z","updated_at":"2025-10-28T16:07:44.533Z","avatar_url":"https://github.com/cyd3r.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-pfs: **P**oor man's large **F**ile **S**torage\n\nAn experiment to replace Git LFS with two text files.\n\ngit-pfs enables you to store (large) files somewhere else and not in your git repository. These files are referenced using entries in the `.gitignore` file of the current git repository.\n\n## Before you continue...\n\nThis is an experiment and has a number of flaws compared to Git LFS. If you just want to use LFS on a different storage, take a look at the [LFS Test Server](https://github.com/git-lfs/lfs-test-server) or other LFS server implementations.\n\ngit-pfs is highly experimental and has number of disadvantages compared to Git LFS:\n\n+ Every user must carefully setup the storage location\n+ The storage directory must contain the same files for all users\n+ `git pfs sync` has to be run manually and can be forgotton which can lead to serious problems\n+ Manual edits to the git-pfs section of the `.gitignore` can break stuff\n+ Deleting `.pfstrack` can break stuff\n+ probably more\n\nBut git-pfs works with only two text files and one git config value! And that's something, right?\n\n## Setup\n\nWith [cargo installed](https://doc.rust-lang.org/cargo/getting-started/installation.html), run `cargo build --release`. This will create the executable `target/release/git-pfs`. Put it somewhere on your `PATH`. You can now use `git pfs` in your terminal.\n\nOnce you have done that you have to let git-pfs know where the storage for your repository is located. Inside your git repository set the `pfs.storage` value in the git config:\n\n``` sh\n# an absolute path is required\ngit config pfs.storage /absolute/path/to/storage\n```\n\n## Usage\n\ngit-pfs works by invoking the three main commands:\n\n+ `add`: Add a file to the storage or update an existing one\n+ `unlink`: Remove a file link to the storage but keep them on the fileystem\n+ `sync`: Synchronize with the storage (this has to be run manually after each git operation)\n\nWhen you call git-pfs for the first time it will create some lines in your `.gitignore`.\n\n**IMPORTANT**: git-pfs relies heavily on some contents of your `.gitignore`. Do not edit the lines between `#\u003epfs` and `.pfstrack` on your own!\n\n## When should I run `git pfs sync`?\n\nBasically whenever your `.gitignore` changes or when you delete or change a linked file.\n\nYou can make use of [git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) to do this automatically for you but not all possible cases (e.g. `git reset --hard`) will be covered. Call `git pfs sync` in the following hooks:\n\n+ post-checkout\n+ post-merge\n+ post-rewrite\n\nThis should take care of most cases.\n\nAn alternative approach is to use a file watcher, e.g. `inotifywait`:\n\n``` sh\nwhile inotifywait -e close_write .gitignore; do git pfs sync; done\n```\n\n## How it works\n\ngit-pfs uses two files: `.gitignore` and `.pfstrack` to keep track of which files have to be uploaded/removed/downloaded.\n\n`.pfstrack` is ignored by git and not changed when git operations happen. Therefore it always represents the last state when git-pfs was run. By comparing `.gitignore` and `.pfstrack` git-pfs can determine which files have to be transferred.\n\nIn the `.gitignore` the filenames and their sha256 hashes are stored (the order is important). The hashes are used as filenames in the storage.\n\n## TODO\n\n+ Make incremental copies to the storage\n+ Recursive add/unlink\n+ Use a git library?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyd3r%2Fgit-pfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyd3r%2Fgit-pfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyd3r%2Fgit-pfs/lists"}