Skip to content

Instantly share code, notes, and snippets.

@TommyStarK
Last active July 26, 2020 15:01
Show Gist options
  • Save TommyStarK/2a956875b9b50a514866a2674dd53166 to your computer and use it in GitHub Desktop.
Save TommyStarK/2a956875b9b50a514866a2674dd53166 to your computer and use it in GitHub Desktop.
Git - fork migratory (upstream changed, new fork = new origin)
$ git remote rename upstream old-upstream
$ git remote add upstream <repo_URL>
$ git remote rename origin old-origin
$ git remote add origin <fork_URL>
$ git push -u origin --all
$ git remote remove old-upstream
$ git remote remove old-origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment