git push的时候报错:error: src refspec xxxxx does not match any. 错误原因和解决方法

2023-05-16

先说一下自己的修改经历 :

       我本身想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的分支和本地对应起来了 问题解决了

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

git push的时候报错:error: src refspec xxxxx does not match any. 错误原因和解决方法 的相关文章

随机推荐