fatal: 'origin' does not appear to be a git repository
git pull origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
git仓库中没有origin分支
![](https://img-blog.csdnimg.cn/img_convert/96140cb0863f9520b7a14c6798227f4a.png)
解决:
git remote -v
git remote add main git@github.com:QVChen/test_dds.git//仓库复制
// git remote add [<options>] <name> <url>
如图
![](https://img-blog.csdnimg.cn/img_convert/78c4b32b070d496f4369b87c11d87766.png)
error: failed to push some refs to 'XXXX.git'
git push -u -origin main//输入后报错
![](https://img-blog.csdnimg.cn/img_convert/042567415921a6587c17c200d45ae4fc.png)
解决:
git pull --rebase origin main
![](https://img-blog.csdnimg.cn/img_convert/166c7ac2e7affa8bf88d2a3318e7ba27.png)
![](https://img-blog.csdnimg.cn/img_convert/e9886368a5deae65782ae097e2200964.png)
没仔细看按Y不停重复,试了下按N,完成rebase
然后
git push -u -origin main
push成功