git lfs 克隆与 git 克隆

git lfs clone vs git clone

如果我在客户端安装了 git lfs 并且 运行:

git clone

这等同于

git lfs clone

还是会出现不同的结果?

谢谢!

这个问题的答案:

Can one clone a Git LFS repo without installing Git LFS?

似乎暗示如果您安装了 git lfs,git clone 将起作用。目前尚不清楚这是否意味着这两个命令的工作方式相同。不幸的是我的声誉太低,无法发表评论和提问。

Cloning at light speed with git lfs clone

A new feature you definitely want to take advantage of if you have a very large repository, and especially if you're on Windows, is the specialized LFS clone command:

git lfs clone ssh://git@mybb-server.com:7999/lfs/repo.git my-clone

The git lfs clone command operates exactly like git clone and takes all the same arguments, but has one important difference: it's a lot faster! Depending on the number of files you have it can be more than 10x faster in fact.

阅读本文以了解 git lfs clonegit clone 的幕后情况 https://developer.atlassian.com/blog/2016/04/git-lfs-12-clone-faster/

我将 git 客户端从 2.10.0 更新到 2.16.1,它现在显示:

WARNING: 'git lfs clone' is deprecated and will not be updated
with new flags from 'git clone'

'git clone' has been updated in upstream Git to have comparable
speeds to 'git lfs clone'.

我想答案是 git lfs clone 现在与 git clone 几乎相同,单独的命令将消失。

git lfs clone 基本上运行以下命令序列(参见 #1973):

$ GIT_LFS_SKIP_SMUDGE=1 git clone git@something.something.git
$ cd something
$ git lfs pull

注意,git lfs clone 自 Git LFS 2.3.0 以来已被弃用(参见 #2526)。简单地说,使用 git clone.