warning: push.default is unset的解决方案

简介: <p><span style="font-family:微软雅黑,Verdana,sans-serif,宋体; font-size:14px; line-height:22.399999618530273px">在执行 git push 时看到如下消息:</span></p> <p><span style="font-family:微软雅黑,Verdana,sans-serif,宋体;

在执行 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 得到解决。

目录
相关文章
|
4月前
|
Dubbo 应用服务中间件
【Default config not found for ApplicationConfig】的一种解决方案
【Default config not found for ApplicationConfig】的一种解决方案
106 0
|
4月前
(node)Warning: Accessing non-existent property ‘xxx‘ of module exports inside circular depen
(node)Warning: Accessing non-existent property ‘xxx‘ of module exports inside circular depen
|
8月前
gitlab--needs、default
gitlab--needs、default
gitlab--needs、default
|
9月前
|
编译器
[C++11]中 =delete和=default
[C++11]中 =delete和=default
48 0
[C++11]中 =delete和=default
error: R_LARCH_SOP_PUSH_PCREL against `x264_log_default‘:PLT shouldn‘t be with r_addend.
error: R_LARCH_SOP_PUSH_PCREL against `x264_log_default‘:PLT shouldn‘t be with r_addend.
132 0
Perhaps you should add the directory containing libpcre.pc to the PKG_CONFIG_PATH
Perhaps you should add the directory containing libpcre.pc to the PKG_CONFIG_PATH
99 0
|
Web App开发 Ubuntu jenkins
Running Firefox as root in a regular user's session is not supported 问题解决
Running Firefox as root in a regular user's session is not supported 问题解决
730 0
Running Firefox as root in a regular user's session is not supported 问题解决
未解决:error: R_LARCH_SOP_PUSH_PCREL against `x264_log_default‘:PLT shouldn‘t be with r_addend.
未解决:error: R_LARCH_SOP_PUSH_PCREL against `x264_log_default‘:PLT shouldn‘t be with r_addend.
417 0
my Note debug - add to function
Created by Wang, Jerry, last modified on Feb 03, 2015
103 0
my Note debug - add to function
|
PHP 开发工具
报错 invalid [default store dir]: /tmp/
php sdk解压以后文件如下   推荐处理方案    1.如果使用支付宝sdk,首先lotusphp_runtime 文件也要一起使用  支付宝现在的php sdk中有lotus框架可以和aop文件   夹放在同一级    2.
833 0