How to change a remote repository URI using Git?
- by e-satis
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).