11

When using Git LFS to push large files to git repository, can a user which does not have git-lfs installed on its system clone it without any additional setup?

4

2 回答 2

8

我只是试着按照你的建议去做。我使用 Git LFS 创建了一个存储 .csv 文件的存储库。我将 repo 推送到了 GitHub。然后,在没有安装 Git LFS 的系统上,我尝试克隆存储库并收到一条错误消息,提示找不到“git lfs”命令:

λ git clone https://github.com/myusername/git_lfs_tests.git
Cloning into 'git_lfs_tests'...
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 11 (delta 2), reused 10 (delta 1), pack-reused 0
Unpacking objects: 100% (11/11), done.
git-lfs filter-process: git-lfs: command not found
fatal: The remote end hung up unexpectedly
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

一旦我安装了 Git LFS,它就可以正常工作了。因此,您似乎需要系统上的 git lfs 来克隆 repo。

于 2017-04-24T05:01:56.387 回答
4

你绝对可以克隆一个没有安装 lfs 的 lfs repo。事实上,git lfs clone现在已弃用。lfs 仅在您结帐时才重要,而不是在您克隆时。如果您在没有 lfs 的情况下结帐(这可能在克隆期间发生),您将获得包含引用而不是真正的大文件的占位符文件。

于 2019-12-03T22:14:20.300 回答