jamescampbell jamescampbell - 3 months ago 17
Git Question

Error with renamed repo in github, "remote: This repository moved. Please use the new location"

I am receiving this notice:

remote: This repository moved. Please use the new location [new location]
when I push updates from my local instance to remote master on github. Is there a way to fix this? Thanks

Edit: getting down voted so obviously doing this wrong. My first question here.


Ok, I figured it out, I need to do the following:

 git remote add new_origin [updated link]
 git remote rm origin
 git remote rename new_origin origin

Edit, it is actually easier than that:

 git remote set-url origin [updated link url https://........git]