首页 > 其他 > 详细

push.default - matching / simple

时间:2017-08-13 22:47:40      阅读:336      评论:0      收藏:0      [点我收藏+]

在git commit 之后执行 git push 时看到如下消息: 

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

技术分享

经查询文档后得知,"matching" 参数是 Git 1.x 的默认行为,其意是如果你执行 git push 但没有指定分支,它将 push 所有你本地的分支到远程仓库中对应匹配的分支。而 Git 2.x 默认的是 "simple",意味着执行 git push 没有指定分支时,只有当前分支会被 push 到你使用 git pull 获取的代码。 

根据提示,修改git push的行为:

git config --global push.default matching

再次执行git push 得到解决。 

push.default - matching / simple

原文:http://www.cnblogs.com/aivnfjgj/p/7355115.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!