如何以下命令:混帳配置: 「remote.origin.push」 與 「push.default」
git config remote.origin.push refs/heads/master:refs/heads/master
涉及以下命令:
git config push.default <option>
(或者與--local
或--global
選項)
其中<option>
是下列之一:
nothing
matching
upstream (formerly tracking)
current
simple
?
我想我明白了第二個配置命令,但我不明白第一個命令條件/如何與第二個命令相關。這裏有一些參考的是提供上下文這背後的問題:
- Warning: push.default is unset; its implicit value is changing in Git 2.0
- Default behavior of "git push" without a branch specified
- What's the difference between `git config` and `git push --set-upstream`
謝謝! - 當你說'git push origin ...','...'是分支名稱(如果提供的話),是正確的? –
是(或任意refspecs,例如'refs/tags/foo',':refs/deleteme'等)。 – torek