termatiko@sysadmin.notes:~$
  • Home
  • Categories
  • Tags
  • Archives

Changing a local git repo's remote URL

How to change the remote url of a local repository

Thegit remote set-url command changes an existing remote repository URL.

Syntax:

git remote set-url <name> <newurl> <oldurl>

The git remote set-url command takes two arguments:

  • An existing remote name <name>. For example, origin (or upstream are two common choices).
  • The new url <newurl> followed by the old url <oldurl>.

Example:

git remote set-url origin https://github.com/username/new.git https://github.com/username/old.git


  • « Markdown Typography
  • Create a backup or a bundle of your git repository »

Published

Απρ 25, 2015

Last Updated

2015-04-25 22:43:00+03:00

Category

Repository

Tags

  • git 2
  • url 1
  • Creative Commons License
    Teramtiko by Salih Emin is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
  • Powered by Pelican. Theme: Elegant by Talha Mansoor