Git - Repoint Remote Repository URL

Raymond Tang Raymond Tang 0 466 0.29 index 1/25/2021

Code snippet

git remote set-url origin 'new_url'

The above command change the remote to a new URL.

For example, the following command changes remote git repository to project sample_proj under sample-org organization on Azure DevOps.

git remote set-url origin https://sample-org@dev.azure.com/sample-org/sample_proj/_git/sample_proj
how-to

Join the Discussion

View or add your thoughts below

Comments