2017-12-21 16 views
0

맨손으로 저장소가 있는지 확인하고 싶습니다. 다음은 내 Mac에서 작동하지 않습니다. ls-remote 명령을 사용하면 내 저장소가 저장소가 아니지만 clone 명령을 사용하여 저장소를 복제 할 수 있습니다.ls-remote를 사용하여 베어 자식 저장소를 테스트하십시오.

내가 뭘 잘못하고 있니?

감사합니다.

repos> git init --bare --shared=all tmp.git 
Initialized empty shared Git repository in 
/Users/raysalemi/workspaces/install_mcs_project/repos/tmp.git/ 
repos> git ls-remote tmp.git 
fatal: 'tmp.git' does not appear to be a git repository 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 
repos> ls 
tmp.git 
repos> git clone tmp.git 
Cloning into 'tmp'... 
warning: You appear to have cloned an empty repository. 
done. 
repos> 

답변

0

나타납니다. git ls-remote은 절대 경로에서만 작동합니다.

+1

'git ls-remote tmp.git'는'tmp.git'를 리모트의 이름으로 취급합니다. 전체 경로 이름을 포함하여 URL을 철자하거나 저장소에 있고 해당 저장소의 구성에 정의 된 원격 기능을 사용할 수 있습니다. – torek