Setting up the upstream remote

suggest change

If you cloned a fork (for example an open source project on GitHub) you may not have push access to the upstream repository. Keep origin pointed at your fork, and add another remote for the upstream repository.

First check the remote names:

$ git remote -v
origin    https://github.com/myusername/repo.git (fetch)
origin    https://github.com/myusername/repo.git (push)
upstream  # this line may or may not be here

If upstream is already listed but has no URL, set it:

$ git remote set-url upstream https://github.com/projectusername/repo.git

If the upstream is not there, or if you also want to add a friend/colleague’s fork (currently they do not exist):

$ git remote add upstream https://github.com/projectusername/repo.git
$ git remote add dave https://github.com/dave/repo.git

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents