git remote url code example

Example 1: get git remote url

git config --get remote.origin.url

Example 2: git config remote.origin.url

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

Example 3: change remote repository git

git remote set-url origin [email protected]:/your-repository.git

Example 4: git set origin

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

Example 5: git check upstream url

git remote show origin

Example 6: git remote url

git config --get remote.origin.url