Git 2.0 changes push default to 'simple'
2014-03-30 14:49
411 查看
原文地址: http://blog.nicoschuele.com/posts/git-2-0-changes-push-default-to-simple
If you've recently updated Git, chances are you've seen this message when doing a git push:
The 'matching' option is the default behavior in Git 1.x. It means that if you do a git push without specifying a branch, it will push all your local branches to their matching ones on your remote repository.
The new default in Git 2.x is 'simple'. It means that when doing a git push without specifying a branch, only your current branch will be pushed to the one git pull would normally get your code from.
As explained in the message, you can set your default in the global config not to get notified each time you push. For 'matching', enter this at the command line:
and for 'simple' (my personal preference), enter this:
If you've recently updated Git, chances are you've seen this message when doing a 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
The 'matching' option is the default behavior in Git 1.x. It means that if you do a git push without specifying a branch, it will push all your local branches to their matching ones on your remote repository.
Simple
The new default in Git 2.x is 'simple'. It means that when doing a git push without specifying a branch, only your current branch will be pushed to the one git pull would normally get your code from.
Set your default
As explained in the message, you can set your default in the global config not to get notified each time you push. For 'matching', enter this at the command line:git config --global push.default matching
and for 'simple' (my personal preference), enter this:
git config --global push.default simple
相关文章推荐
- warning: push.default is unset; its implicit value has changed in Git 2.0 from 'matching' to 'simple
- $ git push warning: push.default 尚未设置,它的默认值在 Git 2.0 已从 'matching' 变更为 'simple'。若要不再显示本信息并保持传统习惯,进行如
- Git 2.0 更改 push default 为‘simple’
- git warning: push.default ,Push 中 Matching & Simple 区别
- git init error:Malformed value for push.default: simple
- git config --global push.default simple 的相关解读
- push changes back to git hub
- warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'.
- Git warning push.default is unset
- 【已解决】github中git push origin master出错:error: failed to push some refs to
- [Git & GitHub] 解决办法:error: failed to push some refs to 'https://github.com/xxxx.git'
- Git error (failed to push some refs)解决
- git https方式pull、push时,提示:error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh
- git pull 时出现 error: Your local changes to the following files would be overwritten by merge的解决办法
- Git — 如何解决failed to push some refs to git
- git - error: failed to push some refs to 'https://github.com/xuzhezhaozhao/Practice.git' 解决办法
- 解决git push错误:failed to push some refs to git
- git出现loose object 8ddef...(stored in .git/objects/8d/def9c03e8...) is corrupt和failed to push some re
- 解析git push出现的Everything up-to-date
- Git上传项目提示Push rejected: Push to origin/master was rejected解决办法