Remotes
Chester Wyke July 21, 2023 Updated: April 26, 2025 #GitSource: https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories
List remotes
git remote -vChange remote URL
git remote set-url origin git@github.com:OWNER/REPOSITORY.gitAdd remote
Source: New github repo
Usually when a new repo is created this command is provided, and this is generally the easiest way to add it as no modification is needed just copy and paste.
git remote add origin git@github.com:OWNER/REPOSITORY.gitClear out remotes that no longer exist
git fetch --prune