How can I find the url after i use 'git clone' to clone a repository
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.
精彩评论