GitHub意外情况1-warning: push.default is unset

来源:互联网 发布:ipadian 安装软件 编辑:程序博客网 时间:2024/05/16 10:53

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


事实上这并不会影响你push的结果,最终push还会成功,因为这只是一个”warning“

你可以按照他说的那样运行:git config --global push.default matching或者git config --global push.default simple命令,以后再push就不会有警告了。


下面说一下push.default matchingpush.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

1
0 0
原创粉丝点击