git lfs 克隆与 git 克隆

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/48392440/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:02:31  来源:igfitidea点击:

git lfs clone vs git clone

gitgit-lfs

提问by Fresh Codemonger

If I have git lfs installed on the client and I run:

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

git clone

is this equivalent to

这相当于

git lfs clone

or will different results occur?

还是会出现不同的结果?

Thank you!

谢谢!

The answer to this question:

这个问题的答案:

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

可以在不安装 Git LFS 的情况下克隆 Git LFS 存储库吗?

seems to imply that git clone will work if you have git lfs installed. It isn't clear if this means that the two commands will work the same. Unfortunately my reputation is too low to comment and ask.

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

采纳答案by Fresh Codemonger

I updated the git client from 2.10.0 to 2.16.1 and it now says:

我将 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'.

I suppose the answer is that git lfs clone is now pretty much the same thing as git clone and the separate command will disappear.

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

回答by mloskot

git lfs cloneessentially runs the following sequence of commands (see #1973):

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

$ GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]
$ cd something
$ git lfs pull

Notice, git lfs clonehas been deprecated since Git LFS 2.3.0 (see #2526). Simply, use git clone.

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

回答by Pankaj Gadge

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://[email protected]:7999/lfs/repo.git my-clone

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

光速克隆 git lfs clone

如果您有一个非常大的存储库,尤其是在 Windows 上,您肯定想利用的一个新功能是专门的 LFS 克隆命令:

git lfs clone ssh://[email protected]:7999/lfs/repo.git my-clone

git lfs clone命令的运行方式完全相同,git clone并采用所有相同的参数,但有一个重要区别:它快得多!根据您拥有的文件数量,它实际上可以快 10 倍以上。

Read through this article to understand behind the scenes of git lfs clonevs git clonehttps://developer.atlassian.com/blog/2016/04/git-lfs-12-clone-faster/

通读本文了解git lfs clonevs git clonehttps://developer.atlassian.com/blog/2016/04/git-lfs-12-clone-faster/