Post

Change Remote Origin

Change Remote Origin

Git remote set-url allows you to change the origin if you need to set a new origin.

  1. View existing remote origin.
    1
    
    git remote -v
    
  2. Update the remote origin.
    1
    
    git remote set-url origin git@github.com:ArcticTechnology/sandbox_updated.git
    
  3. Note: If you have multiple repositories with multiple SSH keys, remember to identify which key you are using. For instance, if your key is github.com-personal then you should set your remote origin to:
    1
    
    git remote set-url origin git@github.com-personal:ArcticTechnology/sandbox_updated.git
    
This post is licensed under CC BY 4.0 by the author.