How to change a remote repository URI using Git?

Posted by e-satis on Stack Overflow See other posts from Stack Overflow or by e-satis
Published on 2010-03-12T12:48:47Z Indexed on 2010/03/12 12:57 UTC
Read the original article Hit count: 108

Filed under:
|
|

I have a repo (origin) on an USB key that I cloned on my hardrive (local). I moved "origin" to a NAS and I successfully tested cloning it from here.

I would like to know if I can change the uri of "origin" in the settings of "local" so it now pull from the NAS, and not from the USB key.

For now, I can see two solutions : - pushing everything to the usb-orign, and copy it to the NAS again (implies a lot of work due to new commits to nas-origin); - adding a new remote to "local" and delete the old one (i fear I'll break my historic).

© Stack Overflow or respective owner

Related posts about git

Related posts about remote