如何在不考虑LFS的情况下克隆/拉取git存储库? [英] How to clone/pull a git repository, ignoring LFS?
本文介绍了如何在不考虑LFS的情况下克隆/拉取git存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一种方法可以显式忽略clone
和pull
上的所有git-lfs文件?
(除了卸载最终要执行的git-lfs
之外).
Is there a way to explicitly ignore all git-lfs files on clone
and pull
?
(besides uninstalling git-lfs
which I ended up doing).
在这种情况下,git-lfs仅包含针对我不使用的平台的预编译库.因此绝对没有用.
In this case git-lfs just contains pre-compiled libs for a platform I don't use... so there is absolutely no use in getting them.
推荐答案
两种选择:
1)使用GIT_LFS_SKIP_SMUDGE变量:
1) Using the GIT_LFS_SKIP_SMUDGE variable:
GIT_LFS_SKIP_SMUDGE=1 git clone SERVER-REPOSITORY
2)配置git-lfs涂抹:
2) Configuring the git-lfs smudge:
git config --global filter.lfs.smudge "git-lfs smudge --skip"
git clone SERVER-REPOSITORY
要撤消此配置,请执行:
To undo this configuration, execute:
git config --global filter.lfs.smudge "git-lfs smudge -- %f"
这篇关于如何在不考虑LFS的情况下克隆/拉取git存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文