Locating the URL of a Git repository on your local machine



Within our Development environment, it’s noticeable that the GIT repository originated from a clone of the TEST repository.

In the config file,

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

I am interested in fetching the Development repository to my local instance. Although //foo/test-foo-project is not a valid path, is there a way for me to identify the correct URL to use?

Solution 1:

A possible Git command to obtain


from within



Git config –get remote.origin.url

Creating a new route would be impossible for you.

The command “$git config” can be used to set a new path, which is referred to as “newPath”.

The occurrence of an error with the message code

could not lock config file ./config: File exists

would result in failure.

Solution 2:

Navigate to your home directory and execute

less .shh/config

to unveil the URL for



In case it’s not available, you may attempt utilizing

git remote show

and subsequently consider using

git remote show origin


Can you provide the command that you used to clone this repository?

Solution 3:

A URL for an MSDT_A1 can be obtained through the use of the MSDT_CODE1 command.

$ gem install giturl
$ giturl .

Frequently Asked Questions

Posted in Git