我在 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/