Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git和gerrit在审查时出现问题_Git_Ssh_Gerrit - Fatal编程技术网

git和gerrit在审查时出现问题

git和gerrit在审查时出现问题,git,ssh,gerrit,Git,Ssh,Gerrit,我和git一起工作 当我提交代码时,它很好,但在审查过程中,它抛出了错误 $ git review 给我以下错误消息: Is this really what you meant to do? Type 'yes' to confirm: yes remote: Resolving deltas: 100% (28/28) remote: Processing changes: refs: 1, done To ssh://name@gerrit.company.info:29418

我和git一起工作

当我提交代码时,它很好,但在审查过程中,它抛出了错误

$ git review 
给我以下错误消息:

Is this really what you meant to do?
Type 'yes' to confirm: yes
remote: Resolving deltas: 100% (28/28)
remote: Processing changes: refs: 1, done    
To ssh://name@gerrit.company.info:29418/bdu-celery
! [remote rejected] HEAD -> refs/publish/master/abc_org_uk_geography (change 257 closed)
error: failed to push some refs to 'ssh://venud@gerrit.timetric.info:29418/bdu-celery'
有人能告诉我们怎么解决这个问题吗


谢谢

git review
看起来像是git命令的别名。我认为它使用了错误的目的地参考规范

您可以使用将代码推送到具有正确参考规范的gerrit服务器,例如

git push gerrit HEAD:refs/for/master
  • gerrit是gerrit git repo的名称

  • 假设要将工作分支推送到主分支


这里的问题很简单,您正试图推进一个封闭式审查--“(更改257已关闭)”

更改257由提交消息中的更改Id标识,例如:

commit 67b36a52914afc3098d9da6750bb8f3d4a9561ac
Author: Paul Bourke <foo@bar.com>
Date:   Wed Mar 12 16:45:53 2014 +0000

    Hello World

    Change-Id: I5e6481e8c069591272d1aee5ab1197e94354ba8c

git review
不是标准的git命令。因此,有人提供了一个名为“
git review
的脚本,它正在为您提供帮助。你可能想和为你提供剧本的人谈谈。您看到的警告是由于将更新推送到不是快进更新的远程分支。在这种情况下,它可能是强制的,但我不知道该脚本还期望什么。可能你已经做了一个基础,不应该这样做。
git commit --amend
# delete the Change-Id line and save
git commit --amend