问题
When I tag the commit then I download from github.com/user/project/releases all LFS file is not coming (original files) but only the file pointers (around 1kb per file)
I tried to call "git lfs fetch" is absolute doesn't work because '.git' folder is not coming with the zip
$ git lfs fetch
Not in a git repository.
When I download the tag through the github.com/user/project/releases it should be the all original file from that tag.
Did I miss something? I tried to search at Google but not found my question.
回答1:
GitHub doesn't provide a way to get the LFS files using the downloadable archives. Some projects include their own tarballs that contains the LFS files, and if so, you can use one of those tarballs.
Otherwise, you can do something like the following to get the LFS files (in this case, for example/project at v1.0.0):
git clone -b v1.0.0 --depth 1 https://github.com/example/project.git project
git -C project archive --format=zip --prefix=project-1.0.0/ HEAD >project-1.0.0.zip
Note that if you're trying to download multiple archives, it will be better to clone the entire repo instead of using a shallow clone as I did above.
来源:https://stackoverflow.com/questions/57443162/how-to-get-git-lfs-files-original-files-not-file-pointers-from-download-as-sou