3

http経由でgitバンドルを複製することは可能ですか? これをやろうとすると、次のようになりました。

$ git clone http://127.0.0.1:8888/repo.bundle
Cloning into 'repo.bundle'...
fatal: repository 'http://127.0.0.1:8888/repo.bundle/' not found

これを行う理由は、サーバー上のリポジトリの圧縮を避けるため (ファイルを提供するだけ) でありgit clone、ユーザーのアプリケーションによって制限されます。

4

1 に答える 1

1

I know of no way to do what you ask. The original purpose of bundles is to compensate for cases where "online" access to a repo (e.g. an HTTP connection, among other things) isn't available; so I doubt that any thought would have been given to a use case like this.

I gather what you want is to prepare a subset of the repo that you anticipate needing to transfer, so that requests for that subset don't incur costs to either transfer additional data or separate what's needed from what's not. In that case, you might consider preparing a shallow clone instead of a bundle. Note that the history for each head to be fetched from a shallow clone must include at least one commit already in the repo doing the fetch. So for example, if you have

x -- x -- ... huge history ... -- O -- x -- x <--(master)
                                   \
                                    A -- B -- C <--(some_branch)

この方法で共有Aしたい場合は、C

git clone --depth=4 -b some_branch url/of/origin some_branch_repo

深さが 4 であるため、これにはOAB、およびC--が含まれsome_branchます。AC

于 2017-10-06T18:00:42.493 に答える