gpt4 book ai didi

git - src refspec ~ 不匹配任何

转载 作者:太空狗 更新时间:2023-10-29 12:55:49 28 4
gpt4 key购买 nike

嗨,我想推送一些东西到特定的远程分支

我制作局部区域

git clone https://~~~.Something
cd https://~~~.Something

我可以使用访问特定的分支

git checkout origin/[branch]

我想向我的特定分支 origin/[branch] 提交一些东西但是当我试图通过

推送一些东西时
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

最佳答案

这里有一个重复的问题,src refspec master does not match any when pushing commits in git

尝试 git show-ref 看看你有什么 refs。有refs/heads/[branch]吗?

您可以尝试 git push origin HEAD:[branch] 作为更独立于本地引用的解决方案。

它对我有用。

关于git - src refspec ~ 不匹配任何,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26701683/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com