“gerrit pits”的版本间的差异
来自个人维基
free6d1823(讨论 | 贡献) (以“ Error: ! [remote rejected] HEAD -> refs/for/master (commit e65b7ce: not Signed-off-by author/committer/uploader in message footer) Solution: git commit -s --amend...”为内容创建页面) |
free6d1823(讨论 | 贡献) |
||
(未显示1个用户的2个中间版本) | |||
第1行: | 第1行: | ||
+ | * clone a project | ||
+ | git clone "ssh://name@domain.com:29418/project" && scp -p -P 29418 name@gerrit.domian:hooks/commit-msg "project/.git/hooks/" | ||
− | Error: | + | |
+ | * 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) | ! [remote rejected] HEAD -> refs/for/master (commit e65b7ce: not Signed-off-by author/committer/uploader in message footer) | ||
Solution: | Solution: |
2020年5月22日 (五) 15:34的最后版本
- 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>