1. 程式人生 > >Git 提示fatal: remote origin already exists 錯誤怎麼解決

Git 提示fatal: remote origin already exists 錯誤怎麼解決

今天連線遠端倉庫得時候報了一個錯誤:fatal: remote origin already exists  這個呢解決只需兩步


1.先刪除遠端git倉庫 git remote rm origin


2.在新增到遠端倉庫就行了 git remote add origin 倉庫地址

3、如果輸入$ git remote rm origin 還是報錯的話,error: Could not remove config section 'remote.origin'. 我們需要修改config檔案的內容  vi .git/config


然後把 [remote “origin”] 那一行刪掉就好了。