【git】本地仓库push远程仓库报错及解决
fatal: 'origin' does not appear to be a git repository
·
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分支
解决:
git remote -v
git remote add main git@github.com:QVChen/test_dds.git//仓库复制
// git remote add [<options>] <name> <url>
如图
error: failed to push some refs to 'XXXX.git'
git push -u -origin main//输入后报错
解决:
git pull --rebase origin main
没仔细看按Y不停重复,试了下按N,完成rebase
然后
git push -u -origin main
push成功
更多推荐
已为社区贡献2条内容
所有评论(0)