使用ls-remote

时间:2017-12-21 18:45:33

标签: git

我想查看是否存在裸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>

1 个答案:

答案 0 :(得分:1)

看来git ls-remote仅适用于绝对路径。

相关问题