git-lfs env端点和LfsStorageDir之间的区别? [英] Difference between git-lfs env Endpoint and LfsStorageDir?

查看:215
本文介绍了git-lfs env端点和LfsStorageDir之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为我了解lfs的机制及其通过指针跟踪二进制文件的方法,并且仅根据需要克隆数据,但是我无法得到lfs存储大数据的可靠确认.就我而言,我怀疑lfs会将数据保留在本地,因为相对于项目(Source + Config:72KB,内容:140.7MB),我的github存储库很小(175KB!),而本地.git目录则更大(1.2GB) .

I think I get the mechanics of lfs and its method of tracking the binary files via pointers and only cloning data as needed but I cannot get a solid confirmation where lfs is storing the bulk data. In my case I suspect lfs is keeping the data local because my github repository is tiny (175KB!) relative to the project (Source+Config:72KB, Content:140.7MB) and the local .git directory is much larger (1.2GB).

运行git lfs env时,我得到以下信息(省略了大部分报告,显示了似乎相关的内容):

When I run git lfs env I get the following (left out the bulk of the report, showing what seems related):

Endpoint (s05_testinggrounds_remote)=https://github.com/rebusb/S05_TestingGrounds.git/info/lfs (auth=basic)
...
LocalMediaDir=D:\Unreal Projects\Udemy C++ S05\TestingGRounds\..git\lfs\objects
...
LfsStorageDir=D:\Unreal Proejcts\Udemy C++ S05\TestingGrounds\.git\lfs
...

我的直觉说文件是本地的,从github报告的大小是正确的,不用担心,但这与我所读到的有关此处的git-lfs文件.我读到的所有内容都说将它们存储在对等服务器或其他服务器上,但是您如何确定该服务器的位置呢?我读到env命令中报告的端点应该是该位置,但是github上报告的大小是错误的.

My intuition says the files are local, the reported size from github is correct, and not to worry, but it contradicts what I have read about github lfs here, and git-lfs files here. Everything I read says it stores them on a peer or a different server, but how do you identify that server location? I read that the Endpoint reported in the env command should be the location but then the reported size on github is wrong.

有人可以弄清Endpoint和LfsStorageDir之间的区别还是解释如何找到lfs数据的实际服务器/位置?

Can someone clear up the difference between Endpoint and the LfsStorageDir or explain how to find the actual server/location of the lfs data?

推荐答案

默认情况下,Git LFS将仅下载您需要的数据以检出提交.当确实下载数据时,它会将其从您在Endpoint中看到的位置下载到LfsStorageDir的子目录中.创建的新对象也将存储在LfsStorageDir的同一子目录中,直到将其推送为止.

Git LFS will, by default, only download the data that you need in order to check out a commit. When it does download data, it downloads it from the location you see in Endpoint to a subdirectory of the LfsStorageDir. New objects you create are also stored in that same subdirectory of LfsStorageDir until you push them.

默认情况下,使用origin遥控器,其标记为Endpoint=;仅当您指定git lfs fetch <remote>时,才使用其他远程值.当您推入一个遥控器时,预推钩使用该遥控器的Endpoint位置将相关的LFS数据推入该遥控器.如果要推送所有LFS数据,可以使用git lfs push --all <remote>.

By default, the origin remote is used, which is labeled as Endpoint=; other remote values are only used if you specify git lfs fetch <remote>. When you push to a remote, the pre-push hooks pushes the relevant LFS data to that remote, using the Endpoint location for that remote. If you want to push all the LFS data, you can use git lfs push --all <remote>.

许多托管服务提供商(例如GitHub)为您的数据提供了一个单独的大文件存储区,可使用标准Git LFS客户端进行访问.无法直接在服务器上查看文件,因为只能使用Web界面或通过LFS客户端访问这些文件.

Many hosting providers (like GitHub) provide a separate large file storage area for your data that is accessible using the standard Git LFS client. It isn't possible to see the files directly on the server, since they are only accessible using the web interface or via the LFS client.

这篇关于git-lfs env端点和LfsStorageDir之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆