什么时候将-u开关添加到git-push中



在哪个版本的git中添加了-u开关?

中央佛罗里达大学的咽炎服务器运行1.5.4.3。当我尝试在git push上使用-u选项时,会出现以下错误。

$ git push -u origin master
error: unknown switch `u'
...

1.7.0版本。

$ git log -S-u Documentation/git-push.txt
commit e9fcd1e2121100d43d2d212eb6c6f1fc82aade1d
Author: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date:   Sat Jan 16 23:45:31 2010 +0200
    Add push --set-upstream
    Frequent complaint is lack of easy way to set up upstream (tracking)
    references for git pull to work as part of push command. So add switch
    --set-upstream (-u) to do just that.
...
$ git tag --contains e9fcd1e
v1.7.0-rc0~71^2

当你想找到这样的东西时,最简单的方法是grep发行说明(通过克隆的git源代码,或者你可以使用github的高级搜索功能并搜索其中一个git镜像)。

1.7.0版本的发行说明如下:

"git-push"学会了"git-ppush——设置上游原点forker:forkee"允许您将"forker"分支配置为稍后从"forkee"中提取
分支在"原点"。

https://github.com/git/git/blob/master/Documentation/RelNotes/1.7.0.txt

最新更新