如果你clone下来一个别人的仓库,在此基础上完成你的代码,推送到自己的仓库可能遇到如下问题:
error: remote origin already exists.表示远程仓库已存在。
因此你要进行以下操作:
1、删除关联的origin的远程库
git remote rm origin
2、查看该项目在git的具体地址(看看有没有删除关联成功)
git remote -v
3、关联自己的仓库
git remote add origin https://gitee.com/xxxxxx.git
4、推送到自己的仓库了
git push --set-upstream origin main
push的时候报错:send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly,使用这个命令,再push
git config http.postBuffer 524288000