开发者

How can I find the url after i use 'git clone' to clone a repository

开发者 https://www.devze.com 2023-03-21 17:14 出处:网络
I use the \'git clone\'开发者_运维问答 to clone a repository from an URL to a local directory and now I forget the URL of that repository that I clone from?

I use the 'git clone'开发者_运维问答 to clone a repository from an URL to a local directory and now I forget the URL of that repository that I clone from?

Thank you.


To list all your remotes:

git remote show

Then just pick the one you want (I assume it's origin):

git remote show origin

This also shows the remote branches and which branches are being tracked.


You can list the branches with:

git branch -va

then for a remote branch, you can do:

git remote show <remote-branch-name>

git help remote and git help branch provide more information.


git remote -v will show your remotes with the URLs you're pushing to and pulling from.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号