您好,我想推送一些东西到特定的远程分支机构
我在当地做的是
git clone https://~~~.Something
cd https://~~~.Something我可以使用下面的命令访问特定的分支
git checkout origin/[branch]我想要将某些内容提交到我的特定分支来源/分支,但是当我尝试使用by推送某些内容时
git push origin [branch]我得到了这个错误
error: src refspec [branch] does not match any.
error: failed to push some refs to 'https://github.com/kkammo/yonseitree.git'我试着解决这个问题,但我找不到任何解决方案。所以请帮帮我T.T
发布于 2015-03-24 11:57:52
这里有一个重复的问题,src refspec master does not match any when pushing commits in git
试试git show-ref看看你有什么参考资料。是否有引用/头/分支
您可以尝试将git push origin HEAD:[branch]作为更独立于本地引用的解决方案。
这对我很管用。
发布于 2017-03-14 22:31:27
下面是你的now分支:
`* dev master remotes/origin/master` 新的分支dev是从master创建的,并且已经完成了一些提交。
使用下面的命令推送这个新分支:
git push -u origin --tags HEAD:dev
在那之后,我们再次检查:
* dev master remotes/origin/dev remotes/origin/master
对我来说没问题。
https://stackoverflow.com/questions/26701683
复制相似问题