从最近开始,我的分支现在默认情况下会跟踪并推送到远程主服务器,即使我这样做git push -u origin branch_name并且即使我将其matching用作push.default选项也是如此。
# --------
# STEP 1
# --------
$ git checkout -b my_branch
Branch my_branch set up to track local branch master.
Switched to a new branch 'my_branch'
# --------------------------------------------------------------------------------
# STEP 2: (same behavior BTW with current/upstream/simple)
# --------------------------------------------------------------------------------
$ git config --global push.default matching
# --------
# STEP 3:
# --------
$ git push -u origin my_branch
Counting objects: 8, done.
Delta compression using up to …Run Code Online (Sandbox Code Playgroud) git ×1