最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

git partial clone with multiple remotes - Stack Overflow

programmeradmin0浏览0评论

I am working with two repos (repo_a and repo_b) which are two forks of the same project. They are both very large in terms of files and history. I need to use a small set of branches from each of them, so I would ideally like to have a partial clone which references both as remotes.

What I did was making a partial clone of repo_a then adding the remote for repo_b:

git clone -b some_branch --filter=blob:none https://.../repo_a.git
cd ./repo_a
git remote add repo_b https://.../repo_b.git

The git config shows the following lines under the [remote "origin"] section as expected, indicating a blobless clone:

    promisor = true
    partialclonefilter = blob:none

but not under the [remote "repo_b"] section. Does it mean that only fetches from origin/repo_a will be blobless, while fetches from repo_b will fetch blobs? Should I add those two lines under [remote "repo_b"] or is there a better way to go about it?

发布评论

评论列表(0)

  1. 暂无评论