Github错误: src refspec BRANCHNAME does not match any

标签 git shell ubuntu github terminal

我在 GitHub 上创建了一个 repo。从网站创建了一个新分支(名为“anythingslider”)。
然后:

cd /home/multiformeingegno
git clone git@github.com:multiformeingegno/cdnjs.git
Enter passphrase for key '/root/.ssh/id_rsa': (done)

我在/home/multiformeingegno/cdnjs 上做了我需要做的改变
然后我想将我的更改推送到任何东西(而不是掌握)。
cd /home/multiformeingegno/cdnjs git add ajax/libs/anythingslider/*
git commit -m "Updated AnythingSlider to reflect original dir structure and added missing default.png"
git push origin anythingslider
Enter passphrase for key '/root/.ssh/id_rsa': (done)

但我得到一个:
error: src refspec anythingslider does not match any.
error: failed to push some refs to 'git@github.com:multiformeingegno/cdnjs.git'

有什么问题?我尝试 pull 以确保我是最新的……没有运气。

编辑:如果我做一个 git remote show origin,这就是我得到的:
* remote origin
  Fetch URL: git@github.com:multiformeingegno/cdnjs.git
  Push  URL: git@github.com:multiformeingegno/cdnjs.git
  HEAD branch (remote HEAD is ambiguous, may be one of the following):
    anythingslider
    master
  Remote branches:
    anythingslider tracked
    master         tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (fast-forwardable)

最佳答案

过去几天,Github 实际上一直在断断续续地宕机。 https://status.github.com/messages

每当您在连接来自 github 的推送或 pull 时遇到问题,请检查 https://status.github.com/看看他们是否有问题。

关于Github错误: src refspec BRANCHNAME does not match any,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15837012/

相关文章:

linux - 唯一的文件 ID?

linux - stdout, stderr 总是可以发送到常规文件吗?

ubuntu - 如何在 WSL2 中启用 cgroup v2?

linux - 如何正确地将本地存储库上的远程设置为服务器上的集中存储库?

git - 是否可以通过 git 别名覆盖 git 命令?

git - 如何通过 http 启用对 git 存储库的匿名读取访问( pull )但经过身份验证的写入访问(推送)?

node.js - 尝试在 Ubuntu 上安装 Node 时出错

git - 在 git 中保持未提交本地更改的实用工作流程是什么?

linux - grep 输出仅在 bash 脚本中打印单行

Laravel Forge 部署脚本失败并显示 'command not found'