Git Snippet: Repoint Remote

From Coder Merlin
Jump to navigation Jump to search

Repoint a Repository to a New Remote[edit]

List current remotes:

git remote -v

Change remote:

git remote set-url origin

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)

CoderMerlin™ proudly recommends:

Your purchase via these links helps keep  Coder Merlin™ 's orbuculum ablaze. As an Amazon Associate we earn from qualifying purchases. Thank you for your support!

Designed with pride in Silicon Valley, CA, USA