gerrit pits

来自个人维基
跳转至: 导航搜索
  • clone a project
git clone "ssh://name@domain.com:29418/project" && scp -p -P 29418 name@gerrit.domian:hooks/commit-msg "project/.git/hooks/"


  • git push error
remote: error: branch refs/heads/master:
remote: To push into this reference you need 'Push' rights.

Solution:

git push origin HEAD:refs/for/master


  • git push Error:
! [remote rejected] HEAD -> refs/for/master (commit e65b7ce: not Signed-off-by author/committer/uploader in message footer)

Solution:

git commit -s --amend

check with git log, you will see:

commit a78ea013a3aed5150cc8089ff40e41a64afae0d6 (HEAD -> master)
Author: name <name@domain.com>
Date:   Fri May 22 12:47:55 2020 +0800
 
    vendor first release 20200320
 
    Change-Id: I0e331aaa99ae15b70133e3b5ea6e7f45eeb1ee98
    Signed-off-by: name <name@domain.com>