我已經設置了我目前的分支dev
推到refs/remotes/test
與以下git push --set-upstream origin dev:test
。如何設置當前分支(dev)推到ref /遠程/測試與git推只?
.git/config
樣子:
[remote "origin"]
url = https://[email protected]/appulocal/test_st.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "dev"]
remote = origin
merge = refs/heads/test
但是當我做git push
它不會從本地dev
推test
遠程。 的Git的bash顯示消息:
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:test
To push to the branch of the same name on the remote, use
git push origin dev
To choose either option permanently, see push.default in 'git help config'.
,這樣如何解決這個只上遠程執行git push
我當前分支dev
推向test
?
'要永久選擇任一選項,請參閱'git help config'中的push.default。 – smarber