GIT.WTF

How to change the url of a remote Git repository?

Written by Sahil Bhatacharya in Mistakes Correction

Let's say if you set the origin as wrong repository URL of an existing local repository, then you can change the remote URL of the origin by running the following:

git remote set-url origin <url of the actual repo>

Sign up below to receive updates, tips and more handy tutorials when git screws up. It’s good stuff & I don’t spam.

A PRODUCT BY KHURAFAT