【发布时间】:2009-06-03 19:35:38
【问题描述】:
我今天遇到了 git push 的问题。我尝试将分支推送到远程存储库,但它给出了错误。
经过一番搜索,我在git irc频道上问过,有人说push的语法是
git push <remote> <localref>:<remoteref>
到目前为止,我只是使用 git push ,它工作得很好。但在这种情况下,它失败了。
我尝试将master以外的某个分支推送到远程服务器,但出现以下错误:
error: src refspec xi-temp-dennis does not match any.
error: failed to push some refs to 'remote.server'
通过指定localref,它突然起作用了。
我的问题是,为什么我这次需要指定 localref?
【问题讨论】: