Skip to content

Instantly share code, notes, and snippets.

@gringoh
Created June 30, 2022 16:50
Show Gist options
  • Save gringoh/2b0212c7a342c983025a67b881f4102e to your computer and use it in GitHub Desktop.
Save gringoh/2b0212c7a342c983025a67b881f4102e to your computer and use it in GitHub Desktop.
[Git: remotes management] #git

Remotes management

Add remote to a local repository

git remote add origin git@github.com:emanuelnlopez/dart-exercism-exercises.git

Add remote to a local repository when using a custom ssh key

git remote add origin git@personal-github:emanuelnlopez/dart-exercism-exercises.git

List remotes

git remote show origin

Override remote

git remote set-url <remote_name> <remote_url>
$ git remote set-url origin https://git-repo/new-repository.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment