Change Git remote URL

To retrieve the current URL you can use:

#:git remote -v
Output:

origin [email protected]:jahantech/test.git (fetch)
origin [email protected]:jahantech/test.git (push)

To update the URL use:

#git remote set-url origin https://hostname/USERNAME/repo.name
# So for me it will be
git remote set-url origin [email protected]:jahantech/test.git
git remote -v

Output:

origin [email protected]:jahantech/test.git (fetch)
origin [email protected]:jahantech/test.git (push)

Leave a Reply

Your email address will not be published. Required fields are marked *