我想查看是否存在裸git存储库。以下内容在我的Mac上不起作用。 ls-remote
命令说我的存储库不是存储库,但clone
命令允许我克隆它。
我做错了什么?
谢谢!
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 :(得分:1)
看来git ls-remote
仅适用于绝对路径。