简体   繁体   中英

What's the meaning of '-u' in 'git push -u origin master'?

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?

The -u flag adds a reference to the upstream server you are pushing to. This lets you git pull without supplying additional arguments ie 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM