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. android 中在CMD中查看sqlite

    今天第一次学习Sqlite,在代码中执行了sql,但是不知道在上面地方才能直观的查看sqlite中的数据,下面是查看资料后的找到的查看方法: 通过上述可以从cmd进入数据库查看原文地址:http:// ...

  2. 那天有个小孩跟我说LINQ(五)转载

    2  LINQ TO SQL(代码下载)      我们以一个简单的销售的业务数据库为例子         表结构很简单:Users(购买者(用户)表),Products(产品信息表),Sales(销 ...

  3. 那天有个小孩跟我说LINQ(四)转载

    1  LINQ TO SQL(代码下载)       我们以一个酒店管理系统的数据库为例子         表结构很简单:GuestInfo(客人信息表),Room(房间表),RoomType(房间类 ...

  4. Maximum Product Subarray动态规划思想

    该题即是昨天没有做出来的题目,想了很久,想出了一个普通的做法,提交发现超时了.思想是新建一个数组,保存每个元素与后面的元素相乘后得到的最大值,然后再在该数组中选出最大的值,返回.[笨死 发现行不通后决 ...

  5. iOS开发——音频篇——音乐的播放

    一.简单说明 音乐播放用到一个叫做AVAudioPlayer的类,这个类可以用于播放手机本地的音乐文件. 注意: (1)该类(AVAudioPlayer)只能用于播放本地音频. (2)时间比较短的(称 ...

  6. 在jsp中选中checkbox后 将该记录的多个数据获取,然后传到Action类中进行后台处理 双主键情况下 *.hbm.xml中的写法

    在jsp中选中checkbox后 将该记录的多个数据获取,然后传到Action类中进行后台处理 双主键情况下 *.hbm.xml中的写法   ==========方法1: --------1. 选相应 ...

  7. C语言——打印魔方阵(每一行,每一列,对角线之和相等)

    <一>魔方阵说明: 魔方阵是一个N*N的矩阵: 该矩阵每一行,每一列,对角线之和都相等: <二>魔方阵示例: 三阶魔方阵: 8   1   6 3   5   7 4   9 ...

  8. (转)所有iOS设备的屏幕分辨率

    Phone: iPhone 1G 320x480 iPhone 3G 320x480 iPhone 3GS 320x480 iPhone 640x960 iPhone 4S 640x960 iPhon ...

  9. 思维导图软件VYM

    http://www.insilmaril.de/vym/ 点击打开链接http://www.oschina.net/p/vym 有人说VYM就跟目录是一回事,确实是这样, 只不过与excel之类的比 ...

  10. [DevExpress]DxValidationProvider分享

    前些日子从研究所临时调回公司,帮忙做另外一个项目的控件验证工作,其实内容非常的简单,就是将用户即将提交至服务器的数据先做一个本地验证,以达到减少服务器压力.提高用户体验的目的. 附上一张图片 这是官方 ...