How to change a remote URL in Git
In this post we will give you information about How to change a remote URL in Git. Hear we will give you detail about How to change a remote URL in GitAnd how to use it also give you demo for it if it is necessary.
we are going to learn about how to change a cloned repo remote url in git.
Changing a Git remote URL
- Change your current working directory to the cloned git repo folder.
cd my-git-repo
- To change a remote URL we need to run the git remote command followed by the set-url, origin
and your new remote url.
git remote set-url origin https://github.com/saigowthamr/javascript.git
Note: In the above code, you need to add your own remote url after origin.
- Now we need to verify our remote url is changed successfully or not by running git remote command followed -v flag.
git remote -v
The output will look like this:
origin https://github.com/saigowthamr/javascript.git (fetch)origin https://github.com/saigowthamr/javascript.com.git (push)
Hope this code and post will helped you for implement How to change a remote URL in Git. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs