mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-10-22 08:59:01 +00:00
bd4c7ce578
This PR cleans up the docs in a way to make them simpler to ingest by our [docs repo](https://gitea.com/gitea/gitea-docusaurus). 1. It includes all of the sed invocations our ingestion did, removing the need to do it at build time. 2. It replaces the shortcode variable replacement method with `@variable@` style, simply for easier sed invocations when required. 3. It removes unused files and moves the docs up a level as cleanup. --------- Signed-off-by: jolheiser <john.olheiser@gmail.com>
1.5 KiB
1.5 KiB
date | title | slug | sidebar_position | draft | toc | aliases | menu | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-05-23T09:00:00+08:00 | 克隆过滤器 (部分克隆) | clone-filters | 25 | false | false |
|
|
克隆过滤器 (部分克隆)
Git 引入了 --filter
选项用于 git clone
命令,该选项可以过滤掉大文件和对象(如 blob),从而创建一个仓库的部分克隆。克隆过滤器对于大型仓库和/或按流量计费的连接特别有用,因为完全克隆(不使用 --filter
)可能会很昂贵(需要下载所有历史数据)。
这需要 Git 2.22 或更高版本,无论是在 Gitea 服务器上还是在客户端上都需要如此。为了使克隆过滤器正常工作,请确保客户端上的 Git 版本至少与服务器上的版本相同(或更高)。以管理员身份登录到 Gitea,然后转到管理后台 -> 应用配置,查看服务器的 Git 版本。
默认情况下,克隆过滤器是启用的,除非在 [git]
下将 DISABLE_PARTIAL_CLONE
设置为 true
。
请参阅 GitHub 博客文章:了解部分克隆 以获取克隆过滤器的常见用法(无 Blob 和无树的克隆),以及 GitLab 部分克隆文档 以获取更高级的用法(例如按文件大小过滤和取消过滤以将部分克隆转换为完全克隆)。