我使用git已经有一段时间了,到目前为止,我一直在使用
git push origin master
然而,最近我遇到了
git push -u origin master
谁能告诉我这两个选项之间的区别是什么,即-u选项代表什么?我试着用谷歌搜索了很多,但没有找到任何能回答我问题的东西。
发布于 2014-07-29 16:56:50
以下是git help push
的输出。根据这一点,它只是告诉将来对git push
的调用要跟踪哪个分支。
-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).
https://stackoverflow.com/questions/25011517
复制相似问题