warning: push.default is unset;
This warning was introduced in Git 1.7.11 along with the simple
style of pushing. The issue is that the current default, matching
, can result in inexperienced users force pushing when some branches are behind their remote equivalent because the branches simply aren't up-to-date. The end result is that they end up rewinding the branch and potentially losing their work or someone else's. The simple
mode was introduced as a new push.default
behavior and will become the default in Git 2.0 (which should hopefully be out sometime early next year).
The new simple
behavior is a lot like the upstream
setting: it only pushes the current branch that you're currently on, if it has a remote branch that it's tracking. It adds one extra criteria: the remote branch must have the same name as the local one.
As you discovered, the way to get rid of the message is to set push.default
. To get the new behavior, use:
git config --global push.default simple
To get Git's default behavior but without the warning message, use:
git config --global push.default matching
I'd really advise against using matching though. In general, most people really want the new simple
behavior, or upstream
.
warning: push.default is unset;的更多相关文章
- Git warning push.default is unset
warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple ...
- warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'.
'matching'参数是 git 1.x 的默认行为,其意是如果你执行 git push 但没有指定分支,它将 push 所有你本地的分支到远程仓库中对应匹配的分支. 而 Git 2.x 默认的是 ...
- git push.default is unset
warning: push.default is unset; its implicit value is changing inGit 2.0 from 'matching' to 'simple' ...
- git push default
今天使用git push的时候出现了如下提示: warning: push.default is unset; its implicit value is changing in Git 2.0 fr ...
- Git 2.x 中git push时遇到 push.default 警告的解决方法
近在学习使用 git&GitHub,然后今天遇到了一个问题.在执行 git add 和 git commit 操作之后,再进行 git push 操作,出现了如下提示: $ git push ...
- Git 2.0 更改 push default
近期更新了git,项目push时会提示这样的信息: warning: push.default 尚未设置,它的默认值在 Git 2.0 已从 'matching' 变更为 'simple'.若要不再显 ...
- git push.default设置
转自:http://blog.csdn.net/daijingxin/article/details/51326715 在进行一次空仓库的提交时,我遇到了这个警告 警告如下: warning: pus ...
- [git]解决:git config --global push.default matching
解决:git config --global push.default matching 这个警告的意思是:需要设置默认push的分支,所以设置好全局push的默认分支就好了.命令如下: 在有git目 ...
- git init error:Malformed value for push.default: simple
git init error:Malformed value for push.default: simple 1.git config --global push.default matching
随机推荐
- C#中params使用
1.参数被params修饰即为可变参数,params只能修饰一维数组. 2.给可变参数赋值的时候,可以直接传递数组的元素. 3.在调用的时候,会自动将这些元素封装为一个数组,并将数组传递. 4.可变参 ...
- git研究2
git也有发布版本时期的tag,不过这个tag,主要是作为一个标记而存在的,或者说在某个commit上面再打一个标记,表明版本是多少.这个和SVN上面的不太一样,SVN感觉有多份保存,似乎没有git方 ...
- EF的TransactionScope
TransactionScope是一个分布式事务的语句块,被包含起来的语句一起被提交,当出现异常,一起回滚,这都是托管的 当Web没有开启MSDTC服务时候会出现:
- Java—static、this、super用法总结
通过用static来定义方法或成员,为我们编程提供了某种便利,从某种程度上可以说它类似于C语言中的全局函数和全局变量.(理解为加了static的就是全局变量)但是,并不是说有了这种便利,你便可 ...
- row_number() OVER (PARTITION BY COL1 ORDER BY COL2)
select *,ROW_NUMBER() over(partition by deviceID order by RecordDate desc row_number() OVER (PARTITI ...
- cognos 10.2.2 导入samples数据源报错解决
操作系统:windows 2008R2 X64 数据库:oracle 10.2.0.1 X32 sid:cognosdb86 安装完samples后,执行IBM安装目录webcontent\sampl ...
- css样式继承 第7节
样式继承: <html> <head> <title>样式继承</title> <style type="text/css"& ...
- PHP pear安装出现 Warning: require_once(Structures/Graph.php)...错误
今天在WINDOWS安装pear,一路无阻很顺利安装完成,接着想安装下pear email包来玩下,但接下来却报: Warning: require_once(Structures/Graph.php ...
- Mybatis 学习历程
MyBatis是一个支持普通SQL查询,存储过程和高级映射的优秀持久层框架. MyBatis消除了几乎所有的JDBC代码和参数的手工设置以及对结果集的检索封装. MyBatis可以使用简单的XML或注 ...
- python 自动化之路 day 07 面向对象基础
本节内容: 面向对象编程介绍 为什么要用面向对象进行开发? 面向对象的特性:封装.继承.多态 类.方法. 面向对象编程 OOP编程是利用"类"和"对象" ...