从gerrit上下载一个review的patch,在此基础上继续修改


1.环境
ubuntu16.04 gerrit
 
2.问题
在gerrit上提交代码,在patch未合并之前,本地文件丢失,从远程下载后继续修改,
并提交到之前的repository.
 
3.解决方法
    3.1. create a floder(where the remote patch will locate), and run "git init" in this new floder.
    3.2  configure remote repository. run "git remote add gerrit https://Launchpad_id@review.openstack.org/openstack/tricircle.git"
           (Launchpad_id is your own launchpad id)
    3.3 download the remote patch. run "git review -d patch_number".
    3.4 then the remote files are downloaded to local respository. Just like the beginning of the your development. edit it as you planned.
    3.5 run "git add .". 
    3.6 run "git commit -a --amend".  
    3.7 run "git review".
         (其中,如果在其他机器上操作,需要配置user.name 和user.email。在自己的机器上,会用已配置好的。branch也会用已配置的。
          git review需要HTTP password for Launchpad_id.此密码不是launchpad邮箱账号的密码,登录github,有HTTP password,即是
          该密码)
         

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM