背景:
因为硬盘挂了,之前的代码提交gerrit之后,需要基于原有的修改,继续修改以及提交,但是本地啥都没有了。需要先从gerrit上面把已有的提交取回来。
步骤:
1. gerrit 打开提交的链接: https://gerrit.qq.com.cn/#/c/12487269/
2.恢复gerrit上面的提交到本地
352 git ls-remote | grep 12487269
353 git pull origin refs/changes/69/12487269/1
[xiaoming@ core]$git ls-remote | grep 12487269
From ssh://9999999@gerritro.qq.com.cn:29418/qq.com
32eee3cd46ed2c9bb1e5be1b42b9f537dad1f912 refs/changes/69/12487269/1
[xiaoming@ core]$git pull origin refs/changes/69/12487269/1
remote: Counting objects: 231, done
remote: Finding sources: 100% (119/119)
remote: Total 119 (delta 105), reused 119 (delta 105)
接收对象中: 100% (119/119), 119.68 KiB | 0 bytes/s, done.
处理 delta 中: 100% (105/105), 完成 104 个本地对象.
来自 ssh://
* branch refs/changes/69/12487269/1 -> FETCH_HEAD
更新 629207f..32eee3c
Fast-forward
参考链接: