Git 提示fatal: remote origin already exists 錯誤解決辦法


1、先刪除遠程 Git 倉庫

git remote rm origin

 

2、再添加遠程 Git 倉庫

git remote add origin https://github.com/XXXXXXXXXXX/design-patterns.git

 

注: 如果執行 git remote rm origin 報錯的話,我們可以手動修改gitconfig文件的內容

        vi .git/config

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

注:若出現“Updates were rejected because the tip of your current branch is behind

       本博客這篇有講如何解決? https://www.cnblogs.com/651434092qq/p/11015806.html

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM