我在github.com上有一个公开的代码仓库,其中包含两个分支:master
和test
。
我在本地创建了一个新目录,并执行了以下操作:
[ ] git clone git@github.com:{username}/{projectname}.git
然后我创建了一个名为my_test
的新分支,其中
[ ] git branch my_test
并切换到它。
[ ] git checkout my_test
然后我将其从我的公共存储库的test
分支合并了起来
[ ] git merge origin/test
我做了一些修改并提交了它们。
然后我试图使用 git 命令将本地的 my_test
分支推送到 GitHub 上的公共 test
分支,结果快进了。
[ ] git push git@github.com:{username}/{projectname}.git test
但是我遇到了这个错误:
error: src refspec test does not match any.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'git@github.com:{username}/{projectname}.git
我做错了什么?