0

When I git pull, I pull from the default branch on my default remote. If I would like to pull from the remote "upstream", I have to specify the upstream branch that I would like to pull from:

git pull upstream name_of_branch.

I would like to specify a default branch for a given remote, so that I can achieve the above just by

git pull upstream

The reason is one of laziness - name_of_branch is in this case a bit of an long awkward name, and I have to do this relatively often.

I have not found a way to do this. Do you have any suggestions?

TomNorway
  • 2,584
  • 1
  • 19
  • 26

1 Answers1

2

You have to setup tracking to your remote branch like this

git branch -u upstream/name_of_branch

and then you can just git pull

Aris
  • 102
  • 3