Efficient storage of binary files in a git repository

前端 未结 5 2146
傲寒
傲寒 2021-02-14 15:13

I would like to have a git repository that consists mainly of binary files.

I need to keep track of the changed, added and removed files to the repository, but I don\'t

5条回答
  •  孤独总比滥情好
    2021-02-14 15:40

    but I don't want for git to version the content of the files themselves.

    That is exactly what Git Large File Storage (LFS) does (by GitHub, April 2015).

    The project is git-lfs (see git-lfs.github.com) and a tested with server supporting it: lfs-test-server:
    You can store metadata only in the git repo, and the large file elsewhere.

    https://cloud.githubusercontent.com/assets/1319791/7051226/c4570828-ddf4-11e4-87eb-8fc165e5ece4.gif

    • Large files are synced separately to a configurable Git LFS server over HTTPS, so you are not limited in where you push your Git repository.

    • Large files are only synced from the server when they are checked out, so your local repository doesn't carry the weight of every version of every file when it is not needed.

    • The meta data stored in Git is extensible for future use. It currently includes a hash of the contents of the file, and the file size so clients can display a progress bar while downloading or opt out of a large download.

提交回复
热议问题