-u
flag adds a tracking reference to the upstream server that we are pushing to.
This lets us do a git push
without specifying other arguments.
For example, once we do a git push -u origin master
, we can later run git push
and git will know that we meant git push origin master