Reputation: 1717
I don't quite understand the meaning of -u
in the git push -u origin master
command. Can you explain what it's used for?
Upvotes: 1
Views: 740
Reputation: 1101
The -u
flag adds a reference to the upstream server you are pushing to. This lets you git pull
without supplying additional arguments i.e. once you enter git push -u origin master
you can then simply type git pull
and this command will understand that in the future you mean git pull origin master
.
Upvotes: 8