How to find the url for a local GIT repository

In our development environment, I see that the GIT repository has been cloned from TEST,

In the configuration file

[remote "origin"] url = //foo/test-foo-project fetch = +refs/heads/master:refs/remotes/origin/master 

Now I want to pull the repository in Development, into my local instance. I know that // foo / test -foo-project is not a real path. But can I determine which URL to use?

+7
source share
2 answers

Git, which can get url from origin

$ git config --get remote.origin.url

But you cannot set a new path

$ git config remote.origin.url "newPath"

This will result in a message error message: could not lock config file ./config: File exists

+4
source

In the less .shh/config home directory, you can see the foo url.

If this does not exist, you can try git remote show , and then probably git remote show origin .

Remember how you cloned this repo, can you skip the command here?

+1
source

All Articles