Git 更換遠端倉庫位址

2021-08-14 08:58:08 字數 411 閱讀 6555

在開發過程中遇到gitlab服務不穩定,需要更換遠端倉庫新的位址。經過了解後有三種方法。

git命令 :git remote set-url origin 「http://***/***/skrobotoa.git」

先刪除遠端倉庫連線,再設定

git命令 :git remote rm origin

直接修改git config檔案

如果你的專案有加入版本控制,那可以到專案根目錄下,檢視隱藏資料夾, 發現.git資料夾,找到其中的config檔案,就可以修改其中的git remote origin位址了。

git更換倉庫位址

bitbucket國內訪問速度太慢了,想把上面的專案轉到os china上來,今天實踐了一下,還是挺簡單的。1.從原始位址 clone 乙份不包含 work copy的倉庫 git clone bare bitbucket project address 2.在os china上建立同名專案。3.以...

git倉庫位址更換網域名稱位址,即更換git託管

如把之前的網域名稱 git.vread.com 更換為git.book.sina.com.cn 1.繫結host。221.179.164 git.book.sina.com.cn 2.清楚原來的git源。git remote remove origin 3.新增新的git源 git remote a...

git修改遠端倉庫位址

git修改遠端倉庫位址 方法有三種 a.修改命令 git remote set url origin url 例如 git remote set url origin gitlab gitlab.chumob com php hasoffer.gitb.先刪後加 git remote rm orig...