Wednesday, June 5, 2019

Add, change, Rename and Remove a Remote in Git

To add a remote link to the existing repo:
git remote add <remote_name> <remote_link>

Example:
git remote add o1 <git_url>

To change the remote url of the remote added.:

git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
To remove the remote.:

git remote rm destination


To rename the remote:

git remote rename origin destination

Reference:
changing-a-remotes-url
removing-a-remote
renaming-a-remote

No comments:

Post a Comment