第一种方法:

  在home目录下,编辑.gitconfig文件,添加

[remote "review"]
    url = ssh://someone@oneip:port/projectgit
    push = HEAD:refs/for/master

  

第二种方法:

  直接在需要push到gerrit的仓库下,运行:

$ git config remote.review.pushurl ssh://someone@oneip:port/projectgit
$ git config remote.review.push HEAD:refs/for/master

  

以上两种方法push到gerrit时,都需要运行:

$ git push review

  

相关文章:

  • 2021-08-31
  • 2021-10-20
  • 2021-10-10
  • 2022-02-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-06
  • 2022-12-23
  • 2021-08-12
  • 2021-11-27
  • 2022-12-23
  • 2021-09-16
相关资源
相似解决方案