如何获取我之前克隆的git存储库?

Sun*_*Lim 5 git github

克隆git存储库后,如何获取存储库文件?

例如)

在"git clone http://sunglim@github.com/asdf/asdf.git "之后

我想知道URL(http://sunglim@github.com/asdf/asdf.git).

我怎样才能做到这一点?

gus*_*tkg 12

你可以使用remote show,虽然它会问你的钥匙:

git remote show origin | grep 'Fetch URL'
Run Code Online (Sandbox Code Playgroud)

  • 要避免被要求输入密钥,请使用`-n`选项. (2认同)

Dav*_*e G 6

如果你查看.git/config,应该有一个类似于以下的块:

[remote "origin"]
    fetch = ...
    url = <this is the url you want>
Run Code Online (Sandbox Code Playgroud)

您可以使用命令行获取此信息

git config --get remote.origin.url
Run Code Online (Sandbox Code Playgroud)

希望能得到你想要的东西.