【问题标题】:git lfs clone vs git clonegit lfs 克隆与 git 克隆
【发布时间】:2018-11-21 17:35:28
【问题描述】:

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

git clone

这是否等同于

git lfs clone

还是会出现不同的结果?

谢谢!

这个问题的答案:

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

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

【问题讨论】:

    标签: git git-lfs


    【解决方案1】:

    我将 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 几乎一样,单独的命令将消失。

    【讨论】:

    • 这对我不起作用。在这个 repo 上执行 git clone:github.com/micasense/imageprocessing.git 会导致 data/ 中的图像无法正确下载。执行 git lfs install 和 git lfs pull(在标准 git pull 之后)会导致图像正确下载。
    • git clone at git (Apple) v2.21.1 没有显示进度,因此无法判断它是否成功,而 git lfs clone 可以
    【解决方案2】:

    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

    【讨论】:

      【解决方案3】:

      git lfs clone进行光速克隆

      您绝对可以使用的新功能 如果您有一个非常大的存储库,想要利用它,并且 特别是如果你在 Windows 上,是专门的 LFS 克隆命令:

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

      git lfs clone 命令的操作与git clone 完全一样 相同的论点,但有一个重要的区别:它是一个 很多 快点!根据您拥有的文件数量,它可能超过 实际上快 10 倍。

      通读本文了解git lfs clone vs git clone 的幕后花絮 https://developer.atlassian.com/blog/2016/04/git-lfs-12-clone-faster/

      【讨论】:

      • 当我看到 osx 窗口时,即使我发出了 git clone 命令,我也看到窗口标题从“ssh
      猜你喜欢
      • 1970-01-01
      • 2015-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-04
      • 2013-08-07
      • 2010-10-19
      相关资源
      最近更新 更多