Git Snippet: Repoint Remote

From Coder Merlin™

Repoint a Repository to a New Remote

List current remotes:

git remote -v

Change remote:

git remote set-url origin https://github.com/USERNAME/REPOSITORY.git

If there are already files present in the repository, you may need to pull:

git pull

If you encounter an issue with unrelated histories, you may want to ignore this condition:

git pull origin master --allow-unrelated-histories

Additional reading: Changes a Remotes URL (GitHub)