Clone a locally mounted repository

2019-04-15 20:17发布

问题:

I keep my bare repositories on an AFS file server, mounted locally. When I clone them, I do

git clone --no-hardlinks file:///afs/whereever.foo.bar/myrepository.git 

I frequently get the following:

warning: remote HEAD refers to nonexistent ref, unable to checkout.

and no files. This is easily fixed with

git branch master origin/master  
git checkout master  

but I was wondering how to fix it so this isn't necessary.

Thanks,
Liam

回答1:

check the /afs/whereever.foo.bar/myrepository.git/HEAD file.



标签: git clone