git pull origin master 不工作[重复]

问题描述 投票:0回答:1

每当我尝试推送我的 git 时,就是当我使用“git push -u origin master”这个命令时 我收到“错误:src refspec master 与任何 错误:无法将一些引用推送到“https://github.com/Username/gitname”“

我尝试了“git pull origin master”并遇到了“致命:找不到远程引用主机”这个错误 我在这里找到的https://www.freecodecamp.org/news/error-failed-to-push-some-refs-to-how-to-fix-in-git/

flutter git github git-commit
1个回答
1
投票

推送不起作用,因为您的本地存储库中似乎没有名为“master”的分支。尝试只使用

git push -u origin
(所以没有引用名称),然后 Git 将默认推送到当前分支。 或者,检查名称或您当前的分支 (
git branch
),然后执行
git push -u origin <branchname>

同样,我认为拉取不起作用,因为远程不包含名为“master”的分支。

© www.soinside.com 2019 - 2024. All rights reserved.