zoukankan      html  css  js  c++  java
  • [git] push.default is unset

    git push的时候遇见报错:

    [root@D128 j]# 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
    
    See 'git help config' and search for 'push.default' for further information.
    (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
    'current' instead of 'simple' if you sometimes use older versions of Git)
    
    Counting objects: 22, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (12/12), done.
    Writing objects: 100% (12/12), 1.05 KiB | 0 bytes/s, done.
    Total 12 (delta 10), reused 0 (delta 0)
    remote: 
    remote: To create a merge request for dev_nlb_redis, visit:
    remote:   http://git.xx.com/xx/xx/merge_requests/new?merge_request%5Bsource_branch%5D=dev_nlb_redis
    remote: 
    To git@git.xx.com:iaas-sdn/j.git
       b46416f..7efce6c  dev_n -> dev_n
    [root@D128 j]# git branch

    大概意思:

    当 push.default 的值设置成 ‘matching’ ,git 将会推送所有本地已存在的同名分支到远程仓库
    从 Git 2.0 开始,git 采用更加保守的值'simple',只会推送当前分支到相应的远程仓库,'git pull' 也将值更新当前分支。

    正确的处理,是设置一下这个值:

    git config --global push.default simple

    https://www.jianshu.com/p/e26175b2e916

  • 相关阅读:
    Mac环境下svn的使用
    开发中常见问题集锦
    【C语言】07基本语句和运算
    【C语言】05printf和scanf函数
    【C语言】03第一个C程序代码分析
    【C语言】06基本数据类型
    【C语言】04函数
    【C语言】01C语言概述
    让UIWebView弹出键盘上的按钮显示中文
    【C语言】02第一个C程序
  • 原文地址:https://www.cnblogs.com/hugetong/p/8882685.html
Copyright © 2011-2022 走看看