Git 更換遠端伺服器倉庫網址 URL

許聖泉 Michael Hsu
2 min readFeb 28, 2019

--

  1. 確認目前Git遠端伺服器網址: git remote -v
$ git remote -v origin https://github.com/USERNAME/REPOSITORY.git (fetch) origin https://github.com/USERNAME/REPOSITORY.git (push)

2.更換Git遠端伺服器位網址,使用:git remote set-url

$ git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git

3.再次確認Git遠端伺服器網址

$ git remote -v origin https://github.com/USERNAME/OTHERREPOSITORY.git (fetch) origin https://github.com/USERNAME/OTHERREPOSITORY.git (push)

--

--

許聖泉 Michael Hsu
許聖泉 Michael Hsu

No responses yet