/ til

How to update git remotes

To list the existing remotes, we can use the following command:

git remote -v
#View existing remotes
origin  https://github.com/user/repo.git (fetch)
origin  https://github.com/user/repo.git (push)

Use the following command to set the remote to a new end point.

git remote set-url origin https://github.com/user/repo2.git
# Change the 'origin' remote's URL

Making sure that worked ;)

git remote -v
# Verify new remote URL
# origin  https://github.com/user/repo2.git (fetch)
# origin  https://github.com/user/repo2.git (push)

Reference: Github

Manu S Ajith

Manu S Ajith

Tech Entrepreneur, dating Elixir, in long-term ❤️ w/ Ruby, had multiple one night stands w/ Go. Into functional paradigms DDD/CQRS/EventSourcing architecture these days. @manusajith on the interwebs

Read More