先说一下自己的修改经历 :
我本身想push到的是一个master的分支bugfix/V1120
然而当我执行 git push origin bugfix/V1120
报错 error: src refspec xxxxx does not match any.
首先我想可能是分支名写错了。但是反复确认后还是有这个错误。
求助了老司机后查看了一下当前文件夹是在哪个分支
git branch 一下,发现显示的是master
这时候意识到自己clone下来的并不是分支bugfix/V1120, 而是整个master
所以我重新clone了一下:
git clone -b bugfix/V1120 xxxxxxxxxxxx.git
然后自己要push的分支和本地对应起来了 问题解决了