Back to blog
Feb 03, 2025
1 min read

How to change the URI (URL) of your remote Git repository

You probaly cloned the repository didn't you, if so the repository comes with the owner url but you can always change it with your own repository url by typing the following commands


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

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

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