Skip to main content
We publish frequent updates to our documentation, and translation of this page may still be in progress. For the most current information, please visit the English documentation.

Collaboration with Git Large File Storage

With Git LFS enabled, you'll be able to fetch, modify, and push large files just as you would expect with any file that Git manages. However, a user that doesn't have Git LFS will experience a different workflow.

如果仓库上的协作者未安装 Git LFS,他们将无法访问原始大文件。 如果他们尝试克隆您的仓库,则只能获取指针文件,而无法访问任何实际数据。

提示:为帮助未启用 Git LFS 的用户,建议设置存储库参与者指南以介绍如何处理大型文件。 例如,可以要求参与者勿修改大型文件,或者将更改上传到文件共享服务,如 DropboxGoogle Drive。 有关详细信息,请参阅“设置存储库参与者指南”。

查看拉取请求中的大文件

GitHub Enterprise Server 不会渲染拉取请求中的一些 Git LFS 对象。 仅显示指针文件,其内容大概如下:

+version https://git-Ifs.github.com/spec/vi
+id sha256:7194bdd797bde471a6e29b4fa9c8c2278b3c4dadfc5cb2c36d7f4531dc6cb8f
+size 17330

有关指针文件的详细信息,请参阅“关于 Git Large File Storage”。

要查看对大型文件所做的更改,请在本地检出拉取请求以查看差异。 有关详细信息,请参阅“在本地签出拉取请求”。

延伸阅读