Git – How to Find URL for Local Repository

git

In our Development environment, I can see that the GIT repository was cloned from TEST,

In the config file,

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

I now want to pull the repository in Development, to my local instance. I know //foo/test-foo-project isn't a real path.. But I can determine which URL to use?

Best Answer

Git command that could get you the url from origin

$git config --get remote.origin.url

But you would not be able to set a new path

$git config remote.origin.url "newPath"

This would fail with the message error: could not lock config file ./config: File exists

Related Question