DEV Community

Cover image for How to remove and add remote origin from a Git repository?
MELVIN GEORGE
MELVIN GEORGE

Posted on • Originally published at melvingeorge.me

How to remove and add remote origin from a Git repository?

Originally posted here!

Remove remote origin in Git

To remove a remote origin from a Git repository, you can use this command,

git remote remove origin
Enter fullscreen mode Exit fullscreen mode

To add new remote origin in Git

Now to add a new origin to a Git repository, you can use this command,

git remote add origin <remote_origin_git_url>
Enter fullscreen mode Exit fullscreen mode

Feel free to share if you found this useful 😃.


Top comments (0)