筆記如何更換 Git 遠端伺服器倉庫網址
先確認目前Git遠端伺服器網址
git remote -v
git remote -v origin https://github.com/USERNAME/REPOSITORY.git (fetch) origin https://github.com/USERNAME/REPOSITORY.git (push)
更換Git遠端伺服器網址
如果是使用 SSH 存取的網址,指令相同
git remote set-url
git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git
再次確認Git遠端伺服器網址
git remote -v
git remote -v origin https://github.com/USERNAME/OTHERREPOSITORY.git (fetch) origin https://github.com/USERNAME/OTHERREPOSITORY.git (push)