mfuchs
mfuchs

Reputation: 2250

How to use remote git-repos for git clone --reference

I want to speed up cloning of some git-repos in my network using a cache. I set up the repo and run git-daemon.

Now I can call

git clone git://my_ip/my_repo

What fails though is

git clone --reference git://my_ip/my_repo git://github.com/my_repo.git

with

fatal: path 'git://my_ip/my_repo' does not exist

Is there a way to use remote repositories for --reference? Or do I need the reference locally?

Upvotes: 2

Views: 1765

Answers (1)

phd
phd

Reputation: 94397

--reference is only about local repositories. See the docs at https://git-scm.com/docs/git-clone#git-clone---reference-if-ableltrepositorygt:

If the reference repository is on the local machine, automatically setup .git/objects/info/alternates to obtain objects from the reference repository.

Upvotes: 3

Related Questions