Add or Set Remote URL
To add a remote repository to a existing git project or to update the existing rep
Note:- You can create a local git repo with "git init" command. Then you wont have the remote repository set. In that case you can add a remote repository with the following command.
git remote add origin https://github.com/USERNAME/REPOSITORY.git
-- or --
git remote add origin [email protected]:USERNAME/REPOSITORY.git
If you want to change the url of an existing remote repository:
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
-- or --
git remote set-url origin [email protected]:USERNAME/REPOSITORY.git
To find remote repo
git remote -v
Copy link