當(dāng)你git clone 別人的代碼時,想推送到自己的倉庫可能遇到如下問題:
error: remote origin already exists.表示遠(yuǎn)程倉庫已存在。文章來源:http://www.zghlxwxcb.cn/news/detail-764027.html
執(zhí)行以下操作即可:
1、git remote -v 查看項目關(guān)聯(lián)的遠(yuǎn)程庫地址
2、先輸入git remote rm origin 刪除關(guān)聯(lián)的 origin 的遠(yuǎn)程庫
3、關(guān)聯(lián)自己的倉庫 git remote add origin https://gitee.com/xxxxxx.git
4、最后git push origin master,這樣就推送到自己的倉庫了。文章來源地址http://www.zghlxwxcb.cn/news/detail-764027.html
到了這里,關(guān)于git 報錯 error: remote origin already exists 解決與代碼上傳到遠(yuǎn)程 gitee 倉庫的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!