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