git push warning questions

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 simplemode 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 simplebehavior, or upstream.

warning: push.default is unset;的更多相关文章

  1. Git warning push.default is unset

    warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple ...

  2. 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 默认的是 ...

  3. git push.default is unset

    warning: push.default is unset; its implicit value is changing inGit 2.0 from 'matching' to 'simple' ...

  4. git push default

    今天使用git push的时候出现了如下提示: warning: push.default is unset; its implicit value is changing in Git 2.0 fr ...

  5. Git 2.x 中git push时遇到 push.default 警告的解决方法

    近在学习使用 git&GitHub,然后今天遇到了一个问题.在执行 git add 和 git commit 操作之后,再进行 git push 操作,出现了如下提示: $ git push ...

  6. Git 2.0 更改 push default

    近期更新了git,项目push时会提示这样的信息: warning: push.default 尚未设置,它的默认值在 Git 2.0 已从 'matching' 变更为 'simple'.若要不再显 ...

  7. git push.default设置

    转自:http://blog.csdn.net/daijingxin/article/details/51326715 在进行一次空仓库的提交时,我遇到了这个警告 警告如下: warning: pus ...

  8. [git]解决:git config --global push.default matching

    解决:git config --global push.default matching 这个警告的意思是:需要设置默认push的分支,所以设置好全局push的默认分支就好了.命令如下: 在有git目 ...

  9. 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

随机推荐

  1. 20160127 linux 学习笔记

    Linux学习笔记第一天 Linux基本介绍 Linux的起源和发展: 简单说linux是一种操作系统,可以安装在包括服务器.个人电脑,乃至PDA.手机.打印机等各类设备中. 起源: Linux起源于 ...

  2. zoj2432 hdoj1423 最长公共上升子序列(LCIS)

    zoj2431  http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2432 hdoj 1423 http://acm.hdu. ...

  3. 从两个集合里排除重复的写法(适用:DB表和字段都很多,表间有关联的情况)

    获取其中一张表bulletinred为1的内容: public IList<BRShow> GetBulInfo() { var result = from a in ((Entities ...

  4. 类库探源——System.Configuration 配置信息处理

    按照MSDN描述 System.Configuration 命名空间 包含处理配置信息的类型 本篇文章主要两方面的内容 1. 如何使用ConfigurationManager 读取AppSetting ...

  5. bzoj1901:Zju2112 Dynamic Rankings

    思路:树套树,我写了两种,一种是线段树套splay,线段树维护区间信息,splay维护第k大,一种是树状数组套权值线段树(并不是什么可持久化线段树,只不过是动态开点罢了,为什么网上一大堆题解都是可持久 ...

  6. (转)C++静态库与动态库

    转自:http://www.cnblogs.com/skynet/p/3372855.html C++静态库与动态库 这次分享的宗旨是——让大家学会创建与使用静态库.动态库,知道静态库与动态库的区别, ...

  7. erlang 练手 进程环

    Erlang 编程指南第四章 练习4-2 编写一个程序,生成N个进程并相连成环,启动环后绕环发送M个消息,当收到退出消息后终止. ringStart(M,N,Message, Cp) -> io ...

  8. 【实习记】2014-09-01从复杂到简单:一行命令区间查重+长整型在awk中的bug

        9月1号,导出sql文件后,想到了awk,但很复杂.想到了用sed前期处理+python排序比较的区间查重法.编写加调试用了约3小时. 9月2号,编写C代码的sql语句过程中,发现排序可以交m ...

  9. js事件对象--DOM中的事件对象/IE中的事件对象/跨浏览器的事件对象

    事件对象    在触发DOM上的某个事件时,会产生一个事件对象event,这个对象中包含着所有与事件有关的信息.包括导致事件的元素.事件的类型,以及其他与特定事件相关的信息.例如,鼠标操作导致的事件对 ...

  10. php 相对路径中 及 绝对路径中 的一些问题

    写本篇文章,是为了以后学习中遇到问题好解决 php的相对路径是以当前工作目录为基准的,并不是以当前处理的文件目录为基准,这样导致我们在开发过程中总会遇到一些问题. 但是如果我们使用绝对路径,就会导致后 ...