Gerrit: 更新gerrit项目的地址

项目所在的远程仓库被迁移到了另一个地址,可以使用下列指令更新本地仓库的地址:

假设项目名称是 HoneyComb 为例

替换前:

$ git remote -v

origin  ssh://catherine_guo@gerrit.realsil.com.cn:29401/HoneyComb (fetch)

origin  ssh://catherine_guo@gerrit.realsil.com.cn:29401/HoneyComb (push)

更新 url:

$ git remote set-url origin ssh://catherine_guo@btsw1.sdlc.rd.realtek.com:29418/HoneyComb

替换后:

$ git remote -v

origin  ssh://catherine_guo@btsw1.sdlc.rd.realtek.com:29418/HoneyComb (fetch)

origin  ssh://catherine_guo@btsw1.sdlc.rd.realtek.com:29418/HoneyComb (push)

<End>

 
原文地址:https://www.cnblogs.com/yongdaimi/p/15740602.html