by Sai gowtham

How to remove a remote origin in Git

In this tutorial, we are going to learn about how to remove a remote origin url from the git repository.

To remove a remote origin we need to run the git remote command followed by the rm origin.

git remote rm origin

Now, you can add a new origin url by using the following command.

git remote set-url origin https://my-new-url.git

If you want to see your current origin url, run the git remote command followed by the -v flag.

git remote -v

Top Udemy Courses

JavaScript - The Complete Guide 2020 (Beginner + Advanced)
JavaScript - The Complete Guide 2020 (Beginner + Advanced)
45,614 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
284,472 students enrolled
40 hours of video content
View Course
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
130,921 students enrolled
21 hours of video content
View Course