3 ms·
You could literally link the two object directories? I just tried this and it seems to work: git clone git://github.com/git/git mkdir git2 cd git2 git
by nothrabannosir 8y ago
You could literally link the two object directories?
I just tried this and it seems to work:
git clone git://github.com/git/git
mkdir git2
cd git2
git init
cd .git/
rm -rf objects
ln -s ../../git/.git
cd ../
git remote add origin git://github.com/git/git
git fetch # returned without downloading anything
git checkout master
ls # etc.
If you seriously want to use this, you'll probably want to hard link the contents, instead. But iirc git clone from local disk already does that, for you?
In short: clone your local copy and taking it from there?
- falsedan 8y agoYou can also use alternates: echo ../../../git/.git/objects >> git2/.git/objects/info/alternates or use the original as a reference: git clone --reference git git://github.com/git/git git2 This sets up the alternates for you.