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