I have a repo (origin) on a USB key that I cloned on my hard drive (local). I moved \"origin\" to a NAS and successfully tested cloning it from here.
I would like to
git remote set-url origin git://new.location
(alternatively, open .git/config
, look for [remote "origin"]
, and edit the url =
line.
You can check it worked by examining the remotes:
git remote -v
# origin git://new.location (fetch)
# origin git://new.location (push)
Next time you push, you'll have to specify the new upstream branch, e.g.:
git push -u origin master
See also: GitHub: Changing a remote's URL