1

I have been using git for a while now, and thus far, I have always used

git push origin master

Recently, however, I have come across

git push -u origin master

Can someone tell me what the difference between the two is, i.e. what the -u option stands for? I've tried googling quite a bit, but didn't find anything that answered my question.

Caílin
  • 51
  • 5

1 Answers1

0

Here is the output of git help push. According to this, it just tells future calls to git push which branch to track.

  -u, --set-upstream
       For every branch that is up to date or successfully pushed, add
       upstream (tracking) reference, used by argument-less git-pull(1)
       and other commands. For more information, see branch.<name>.merge
       in git-config(1).
merlin2011
  • 71,677
  • 44
  • 195
  • 329