-1

What is syntax for the Git command to pull from a GitHub repository using a remote?

I'm using Git Bash on Windows 8.1.

I want to update my local files from the repository. I have two remotes - origin and upstream. I want to update from upstream. The branch on upstream, is master.

Q: How do I specify both the remote AND the branch to pull from?

I am not seeing it in the documentation!

If I enter $git pull upstream

it responds.. "You asked to pull from the remote 'upstream', but did not specify a branch. Because this is not the default configured remote for your current branch, you must specify a branch on the command line."

How can I be missing something so common? !!

JamesWHurst
  • 493
  • 8
  • 14
  • 1
    [How are you missing someting so common?](http://git-scm.com/docs/git-pull) – pratZ Feb 27 '15 at 06:17
  • possible duplicate of [git - pulling from specific branch](http://stackoverflow.com/questions/4924002/git-pulling-from-specific-branch) – Sascha Wolf Feb 27 '15 at 07:29

1 Answers1

3

Try:

git pull upstream master

to pull from the master branch on the remote called upstream

Matt Healy
  • 18,033
  • 4
  • 56
  • 56