src refspec test does not match any.

Crazy:testTwo crazy$ git status
//当前的分支
On branch userTest
Your branch is ahead of ‘origin/test’ by 1 commit.
(use “git push” to publish your local commits)
nothing to commit, working directory clean

情形:我在userTest分支上修改了test.md文件,同时使用了git add 和 git commit 命令。现在将test.md的内容推送到远程分支test上。

//使用的推送命令
Crazy:testTwo crazy$** git push origin test**

//结果发生错误
error: src refspec test does not match any.
error: failed to push some refs to ‘git@github.com:WCrazyStone/testTwo.git’
Crazy:testTwo crazy$

解决方案:
git push origin userTest:test

    原文作者:Crazy2015
    原文地址: https://www.jianshu.com/p/a1f9c020dcc6
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞