git lfs clone vs git clone

2020-06-09 06:03发布

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

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?

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 git-lfs
3条回答
闹够了就滚
2楼-- · 2020-06-09 06:27

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.

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

查看更多
Summer. ? 凉城
3楼-- · 2020-06-09 06:28

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

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.

查看更多
疯言疯语
4楼-- · 2020-06-09 06:43

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

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

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

查看更多
登录 后发表回答