less than 1 minute read

Use case: you have checked out a repo. then forked it and now want to checkout the fork without downloading everything again.
Solution:

$ git remote rename origin upstream
$ git remote add origin git@github...my-fork
$ git fetch origin
$ git push origin
$ git branch --set-upstream-to=origin/master master

Source: https://gist.github.com/jagregory/710671

Categories:

Updated: