我已经设置了我目前的分支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