2

Possible Duplicate:
Can I update a forked project, on git, to the original/master copy?

Let's say I fork a project, and then clone it down to my machine.

At this point, git pull, as well as git fetch and git rebase origin/branch_name, refer to my forked repository. If I wanted to rebase to the original repository's master, how would I go about doing this?

Community
  • 1
  • 1
Abraham P
  • 14,341
  • 11
  • 53
  • 122

1 Answers1

10

Add the original repo as a remote

git remote add upstream git@github.com:<OriginalUser>/<OriginalRepo>.git

then rebase from there

git fetch upstream
git rebase upstream/master
Gabriele Petronella
  • 104,800
  • 21
  • 210
  • 229