Gerrit 提交更改到gerrit服務器

一般都是git push 但是現在要push到一個虛擬的分支上面

Usually when you push to a remote git, you push to the reference '/refs/heads/branch', but when working with Gerrit you have to push to a virtual branch representing "code review before submission to branch". This virtual name space is known as /refs/for/<branch>

  user@host:~/demo-project$ git push origin HEAD:refs/for/master
  Counting objects: 4, done.
  Writing objects: 100% (3/3), 293 bytes, done.
  Total 3 (delta 0), reused 0 (delta 0)
  remote:
  remote: New Changes:
  remote:   http://localhost:8080/1
  remote:
  To ssh://user@localhost:29418/demo-project
   * [new branch]      HEAD -> refs/for/master
  user@host:~/demo-project$

然後就可以去gerrit網頁上能看到這個提交了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章