如果你clone下來一個別人的倉庫,在此基礎(chǔ)上完成你的代碼,推送到自己的倉庫可能遇到如下問題:
error: remote origin already exists.表示遠(yuǎn)程倉庫已存在。
因此你要進(jìn)行以下操作:
1、刪除關(guān)聯(lián)的origin的遠(yuǎn)程庫
git remote rm origin
2、查看該項(xiàng)目在git的具體地址(看看有沒有刪除關(guān)聯(lián)成功)
git remote -v
3、關(guān)聯(lián)自己的倉庫
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