How do I update a github fork from the original repo?

I forked a github repo.
Now I want to update my fork to the current repo version. How can I do that?

  • Team member added hundreds of megs to git
  • Code Review tools for Ruby/Rails?
  • Git and multiple repositories
  • Why does git checkout <remote_branchname> not create new tracking branch?
  • Publish Jekyll Site To Git Repository
  • Git Install Script How to enter shell command
  • What Unix tool to quickly add/remove some text to a Python script?
  • How should Git Flow work with QA testing both a release and a new feature?
  • Trying to get the list of ec2 instances under a deployment group using aws command
  • Executing git commands via php over http
  • Write GIT pre-commit hook in java?
  • Git: Why does rebase result in conflicts while merge does not?
  • One Solution collect form web for “How do I update a github fork from the original repo?”

    I had the same doubt and found the answer in the github help.

    git remote add upstream git://url-to-original
    git fetch upstream
    git merge upstream/master
    git push

    upstream is the name I gave to the original repository.

    Hope it helps.

    Git Baby is a git and github fan, let's start git clone.