zoukankan      html  css  js  c++  java
  • warning: push.default is unset;

    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.

  • 相关阅读:
    ps 命令
    wc 命令
    grep 命令
    date 命令
    cal 命令
    df 命令
    secureCrt 开启Linux上的oracle服务
    动态规划_01背包问题_Java实现
    贪心算法_01背包问题_Java实现
    贪心算法_01背包问题_Java实现
  • 原文地址:https://www.cnblogs.com/chucklu/p/4754533.html
Copyright © 2011-2022 走看看