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?
If you've copied a project from Github, it already has an origin. You can view that origin with the command git remote -v, which will list the URL of the remote repo.
On GitHub.com, navigate to the main page of the repository. Above the list of files, click Code. Copy the URL for the repository.
You can find the list of all local git repositories by navigating from “Git > Local Repositories.” Based on the previously configured folder for the local repos, Visual Studio will change the context for the local repositories. Then, you will have all the local repos on your fingertip.
A remote URL is Git's fancy way of saying "the place where your code is stored." That URL could be your repository on GitHub, or another user's fork, or even on a completely different server. You can only push to two types of URL addresses: An HTTPS URL like https://github.com/user/repo.git.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With