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.
1
git remote add origin https://github.com/USERNAME/REPOSITORY.git
2
-- or --
3
git remote add origin [email protected]:USERNAME/REPOSITORY.git
Copied!
If you want to change the url of an existing remote repository:
1
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
2
-- or --
3
git remote set-url origin [email protected]:USERNAME/REPOSITORY.git
Copied!
To find remote repo
1
git remote -v
Copied!
Last modified 2mo ago
Copy link