Use Git LFS when the asset follows a revision
Git Large File Storage records text pointers in Git while keeping the file contents in separate storage. It can suit binary assets whose versions need to remain associated with particular commits. Both the Git history and the corresponding large-file objects matter when checking out or recovering the project.
Establish which file patterns use LFS and commit the relevant attributes. Check that the remote, local tools, and build environment support the workflow. Our Git LFS guide walks through these choices and the difference between tracking future files and migrating existing history.
Use object storage for an independent lifecycle
Object storage organizes data as separately addressable objects. Amazon's S3 introduction provides one concrete example: objects contain file data and metadata within buckets. Evaluate the chosen service's access controls, versioning options, lifecycle behavior, and retrieval requirements for the application you are building.
Consider this approach when uploads, media libraries, exports, or public downloads change independently of source commits. Keep the application code and storage references understandable, and define who can create, replace, or delete an object. A stable filename should not silently mean different content when reproducibility matters.
Compare three practical situations
- Editable artwork tied to a release: consider LFS when the source revision should identify the exact asset used.
- Build output for users to download: consider an artifact or object-storage workflow with a release identifier and integrity check.
- Files uploaded while the application runs: design an application storage and backup process independent of developer commits.
Keep a small manifest in source when it helps connect externally stored assets to a build. Record identifiers or checksums that your tooling can verify, while keeping real access credentials outside the committed manifest.
Test the complete transfer path
Reproduce a checkout and build in a fresh environment. Confirm that required assets arrive as usable files, not unresolved references. Test the credentials used by automation, including the case where an asset cannot be fetched. The failure should explain what is missing rather than leaving a broken page or an ambiguous build.
For assets delivered to browsers, check file types, caching, filenames, and access behavior. The Nginx and CDN deployment guide connects storage decisions with delivery. Keep private assets out of an intentionally public publishing path.
Plan retention before storage grows
Define which historical versions must remain available and how they will be recovered. Coordinate cleanup with releases that still reference the assets. A storage-saving change can break an older checkout if it removes an object that checkout needs. Include separate asset storage in the project recovery plan, and rehearse restoration with a representative build.