Git warning push.default is unset

[shell]
warning: push.default is unset; its implicit value is changing in Git 2.0 from ‘matching’ to ‘simple’.

To squelch this message and maintain the current behavior after the default changes, use: git config –global push.default matching

To squelch this message and adopt the new behavior now, use: git config –global push.default simple
[/shell]

出现这个提示,但是实际上,git还是会提交。

可以按照上述指令运行:git config –global push.default matching或者git config –global push.default simple命令,以后再push就不会有警告。

下面说一下push.default matching和push.default simple的区别:

push.default设置maching的意思是:git push 会把你本地所有分支push到名称相对应的远程主机上。这意味着可能你会在不经意间push一些你原本没打算push的分支。

push.default设置成simple的意思是:git push仅仅把当前所在分支push到从当初git pull pull下来的那个对应分支上,另外,这个过程也会同时检查各个分支的名称是否相对应。

详细说明:http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0

Leave a Reply

Your email address will not be published. Required fields are marked *