Check out example codes for "git set origin". It will help you in understanding the concepts better.

Code Example 1

git remote -v
 git remote set-url origin https://github.com/USERNAME/REPOSITORY.git

Code Example 2

git remote add origin <git_url>

Code Example 3

git remote add origin [email protected]:portfolio/space.space_name.git

Code Example 4

git remote add origin [email protected]:nikhilbhardwaj/abc.git

Code Example 5

# change remote url
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git

Code Example 6

# Overwriting an existing git url:
git remote set-url origin <git_url>

Learn ReactJs, React Native from akashmittal.com