我有两个不同版本的git。在1.6.2版本中,git push
命令没有 -u
选项,只有在1.7.x版本中才有。
从文档中可以看到,-u
选项与变量有关。
branch.<name>.merge
在 git config
中,此变量如下所述:
Defines, together with branch.<name>.remote, the upstream branch
for the given branch. It tells git fetch/git pull which branch to merge.
什么是上游分支?