Site icon Mr. 沙先生

Git 2.x 的 push 模式 “Matching” 和 “Simple”

自從 git 升級為 2.x 版本之後,push 模式就調整為兩種模式 Matching、Simple 如果你沒有設定,在 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)

 

在 git 2.0 before 預設使用的是 Matching

 

 

一般狀況建議可以設置 Simple 就好,如果需要 push all branch 可以使用 –all 參數

$ git push --all

 

 

 

 

 

 

Exit mobile version