1. 问题所示
刚开始学习git或者步入公司的时候对git的一些基本操作或者错误还不会处理
可能会出现如下问题:
git push origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
截图如下:
2. 原理分析
git add 以及commit命令都可,就是push上传的时候出现了问题
主要原因是链接不上,本地分支和远程分支断开连接
所以重新链接即可
可熟悉如下命令,进一步排查
git branch -v
,查看是分有分支,甚至是否已经断开链接git remote –v
,查看是否断开链接,如果没有