Git常见错误汇总

1. “error: src refspec master does not match any”错误

在git push -u origin master之后,报此错误。
原因如下:

  • 没有将工作区的文件添加到本地仓库中去。

解决办法:

  • 使用git add . 将工作区的所有文件都添加到本地仓库中。

2. “fatal: pathspec 'readme.txt' did not match any files”错误

问题描述:在git add 之后报错
原因分析:

  • 文件名错误、不存在此文件。
posted @ 2021-10-29 21:24  曼路的个人博客  阅读(29)  评论(0)    收藏  举报